Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
111256 | 糜宗易 | 13求n加到m的和 | C++ | Compile Error | 0 MS | 0 KB | 332 | 2025-03-01 11:15:30 |
#include<bits/stdc++.h> using namespace std; int main(){ int sum=0; int n,m; cin>>n>>m; for(int i=n;i<=m;i++){ sum=sum+i; } cout<<sum; return 0; }#include<bits/stdc++.h> using namespace std; int main(){ int sum=0; int n,m; cin>>n>>m; for(int i=n;i<=m;i++){ sum=sum+i; } cout<<sum; return 0; }
Main.cc:12:2: error: stray '#' in program }#include ^ Main.cc:12:3: error: 'include' does not name a type }#include ^ Main.cc: In function 'int main()': Main.cc:14:5: error: redefinition of 'int main()' int main(){ ^ Main.cc:3:5: note: 'int main()' previously defined here int main(){ ^