| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 142609 | 梁敖铭 | A+B 输入输出练习IV | C++ | Compile Error | 0 MS | 0 KB | 272 | 2026-01-11 14:43:52 |
include <iostream> using namespace std; int main(){ int a,b,n,sum=0,m; scanf("%d",&n); for(int i=0;i<n;i++){ sum=0; scanf("%d",&m); for(int j=0;j<m;j++){ scanf("%d",&a); sum+=a; } printf("%d\n",sum); } return 0; }
Main.cc:1:1: error: 'include' does not name a type
include
^
Main.cc: In function 'int main()':
Main.cc:6:14: error: 'scanf' was not declared in this scope
scanf("%d",&n);
^
Main.cc:15:22: error: 'printf' was not declared in this scope
printf("%d\n",sum);
^
Main.cc:5:7: warning: unused variable 'b' [-Wunused-variable]
int a,b,n,sum=0,m;
^