| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 74138 | Py自测 | 美丽数 | C++ | Compile Error | 0 MS | 0 KB | 387 | 2024-05-23 10:42:09 |
#include <iostream> using namespace std; int main() { cin.tie(0); int n; int a[100005]; int c=1;//计数 for(int i = 1;;i++) { if(i%3==0||i%5==0) { a[c++]=i; } if(c>100001) { break; } } while(cin >> n){ cout << a[i] << '\n'; } return 0; }
Main.cc: In function 'int main()':
Main.cc:23:19: error: 'i' was not declared in this scope
cout << a[i] << '\n';
^