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

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:12: error: 'd' was not declared in this scope
  while(a+b+d<30){
            ^
Main.cc:6:14: warning: unused variable 'c' [-Wunused-variable]
  int a=0,b=0,c=0,i=0,num=0;
              ^