Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
4296 | 李伟和 | 累加器 | C++ | Compile Error | 0 MS | 0 KB | 178 | 2024-08-16 00:37:10 |
#include <iostream> using namespace std; int main(){ int n,sum=0; cin>>n; for(int i=0;i<=n;i++){ sum+=i } cout<<sum/2<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:8:5: error: expected ';' before '}' token } ^