| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 154804 | 唐瑞尧 | 12奇数和与偶数和 | C++ | Compile Error | 0 MS | 0 KB | 203 | 2026-05-31 09:28:06 |
#include <iostream> using namespace std; int main(){ int m,n; cin>>m>>n; for(int i=m;i<=n;i++) if(i%2==0) a+=i; else b+=i; cout<<a<<b; return 0; }
Main.cc: In function 'int main()':
Main.cc:9:20: error: 'a' was not declared in this scope
if(i%2==0) a+=i;
^
Main.cc:10:14: error: 'b' was not declared in this scope
else b+=i;
^
Main.cc:11:11: error: 'a' was not declared in this scope
cout<