| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 146524 | 孔声豪 | 15听到多少次掌声 | C++ | Compile Error | 0 MS | 0 KB | 393 | 2026-01-29 11:51:38 |
#include<iostream> using namespace std; int main(){ int a,b,d,t,cnt: bool n=0; t=0; a=b=d=cnt=0; while(a+b+c<30){ t++; n=0; if(a<10){ n=1; a++; } if(b<10&&t%2==0){ n=1; b++; } if(d<10&&t%4==0){ n=1; d++; } if(n) cnt++; } cout<<cnt<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:4:18: error: expected initializer before ':' token
int a,b,d,t,cnt:
^
Main.cc:7:11: error: 'cnt' was not declared in this scope
a=b=d=cnt=0;
^
Main.cc:8:11: error: 'c' was not declared in this scope
while(a+b+c<30){
^
Main.cc:10:5: error: 'n' was not declared in this scope
n=0;
^