Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
141296 张宇泽 15听到多少次掌声 C++ Compile Error 0 MS 0 KB 524 2025-12-21 21:44:26

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a=0,b=0,c=0,l=0; int i=0; while(a+b+c<30){ int f=0; if(a<10 ){ a++; f=1; } if(b<10){ if(i%2==0){ b++; f=1; } } if(c<10){ if(i%4==0){ c++; f=1; } } } if(f==1){ l++; } i++; cout<<l; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:13: warning: variable 'f' set but not used [-Wunused-but-set-variable]
         int f=0;
             ^
Main.cc:26:8: error: 'f' was not declared in this scope
     if(f==1){
        ^