Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
142607 徐毅然 A+B 输入输出练习IV C++ Compile Error 0 MS 0 KB 264 2026-01-11 14:42:36

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,b; while(scanf("%d",&a)a){ int c=0; for(int i=0;i<n;i++){ scanf("%d",&b); c+=b; } printf("%d\n",sum); } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:25: error: expected ')' before 'a'
     while(scanf("%d",&a)a){
                         ^
Main.cc:5:26: error: expected ';' before ')' token
     while(scanf("%d",&a)a){
                          ^
Main.cc:14:1: warning: statement has no effect [-Wunused-value]
 }
 ^
Main.cc:4:11: warning: unused variable 'b' [-Wunused-variable]
     int a,b; 
           ^
Main.cc:14:1: error: expected '}' at end of input
 }
 ^