| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79877 | 黄睿杰 | [在线测评解答教程] 求和 | C++ | Compile Error | 0 MS | 0 KB | 169 | 2024-07-10 19:43:53 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int s=0;a for(int i=1;i<=n;i++) s+=i; cout<<s<<endl; }a return 0; }
Main.cc: In function 'int main()':
Main.cc:6:11: error: 'a' was not declared in this scope
int s=0;a
^
Main.cc:7:15: error: 'i' was not declared in this scope
for(int i=1;i<=n;i++) s+=i;
^
Main.cc:9:3: error: 'a' was not declared in this scope
}a
^