Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102762 | 冯瀚翔 | 12奇数和与偶数和 | C++ | Compile Error | 0 MS | 0 KB | 242 | 2024-12-22 15:56:16 |
#include <iostream> using namespace std; int main() { int n,m,a=0,b=0; cin>>n>>m; for (int i=n; i<=m; i=i+1) { if(i%2==0) b=b+i; else a=a+i; } cout<<=b<<" "<<a; return 0; }
Main.cc: In function 'int main()': Main.cc:13:11: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<' cout<<=b<<" "<