| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123339 | 赵梓渊 | 12for循环练习I | C++ | Compile Error | 0 MS | 0 KB | 182 | 2025-06-29 12:38:19 |
#include<bits/stdc++.h> using namespace std; int main() { int n = 20; cin n; for (int i = 1; i <= n; i++) { int n = n + i; cout << n << " "; } cout << i << endl;
Main.cc: In function 'int main()':
Main.cc:5:9: error: expected ';' before 'n'
cin n;
^
Main.cc:5:10: warning: statement has no effect [-Wunused-value]
cin n;
^
Main.cc:10:10: error: 'i' was not declared in this scope
cout << i << endl;
^
Main.cc:10:19: error: expected '}' at end of input
cout << i << endl;
^