Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146523 孔声豪 15听到多少次掌声 C++ Compile Error 0 MS 0 KB 388 2026-01-29 11:49:10

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a,b,d,t,cnt: bool n=false; while(a+b+c!=30){ t++; n=false; if(a<10){ n=true; a++; } if(b<10&&t%2==0){ n=true; b++; } if(d<10&&t%4==0){ n=true; d++; } if(n=true) cnt++; } cout<<cnt<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:18: error: expected initializer before ':' token
   int a,b,d,t,cnt:
                  ^
Main.cc:6:11: error: 'c' was not declared in this scope
 while(a+b+c!=30){
           ^
Main.cc:8:5: error: 'n' was not declared in this scope
     n=false;
     ^
Main.cc:22:9: error: 'cnt' was not declared in this scope
         cnt++;
         ^
Main.cc:24:11: error: 'cnt' was not declared in this scope
     cout<