Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
142602 梁敖铭 A+B 输入输出练习IV C++ Compile Error 0 MS 0 KB 252 2026-01-11 14:41:48

Tests(0/0):


Code:

include <iostream> using namespace std; int main(){ int a,b,n,sum=0,m; cin>>n; for(int i=0;i<n;i++){ sum=0; cin>>m; for(int j=0;j<m;j++){ cin>>a; sum+=a; } cin>>endl>>sum; } return 0; }


Run Info:

Main.cc:1:1: error: 'include' does not name a type
 include  
 ^
Main.cc: In function 'int main()':
Main.cc:6:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^
Main.cc:15:10: error: 'endl' was not declared in this scope
     cin>>endl>>sum;
          ^
Main.cc:5:7: warning: unused variable 'b' [-Wunused-variable]
 int a,b,n,sum=0,m; 
       ^