| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122965 | 王镜铭 | 12奇数和与偶数和 | C++ | Compile Error | 0 MS | 0 KB | 176 | 2025-06-22 12:22:34 |
#include<bits/stdc++.h> using namespace std; int main(){ cout a,b; for(int i=a,s=0,x=0;i<=b;i++){ if(i%2==0){ s+=i; } else{ x+=i; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:4:7: error: expected ';' before 'a'
cout a,b;
^
Main.cc:4:10: warning: statement has no effect [-Wunused-value]
cout a,b;
^
Main.cc:5:12: error: 'a' was not declared in this scope
for(int i=a,s=0,x=0;i<=b;i++){
^
Main.cc:5:25: error: 'b' was not declared in this scope
for(int i=a,s=0,x=0;i<=b;i++){
^
Main.cc:7:4: error: 's' was not declared in this scope
s+=i;
^
Main.cc:10:4: error: 'x' was not declared in this scope
x+=i;
^