| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122971 | 王镜铭 | 12奇数和与偶数和 | C++ | Compile Error | 0 MS | 0 KB | 191 | 2025-06-22 12:25:47 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; for(int i=a,s=0,x=0;i<=b;i++){ if(i%2==0){ s=s+i; } else{ x=x+i; } } cout<<x<<s; return 0; }
Main.cc: In function 'int main()': Main.cc:13:8: error: 'x' was not declared in this scope cout<