Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
74142 Py自测 美丽数 C++ Compile Error 0 MS 0 KB 348 2024-05-23 10:52:01

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; const int N = 100005; int a[N]; int main() { cin.tie(0); int c = 0; for(int i = 1;; ++i){ if(i % 3 == 0 || i % 5 == 0) a[++c]=i; if(c > N) break; } while(cin >> n){ cout << a[n] << '\n'; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:18:18: error: 'n' was not declared in this scope
     while(cin >> n){
                  ^