Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135737 陈骏睿 百钱买百鸡II C++ Compile Error 0 MS 0 KB 629 2025-11-08 12:16:39

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int x,y,z,N,c=0; cin>>N; for(x=0;x<=N/5;x++){ for(y=0;y<=N/3;y++){ for(z=0;z<=N/3;z++){ if(N==x+y+3*z && N==5*x+3*y+z){ c++; cout<<c<<':'<<" "<<x<<','<<y<<','<<z*3<<endl; } } } } else if(c==0) cout<<"None"<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:20:7: error: 'else' without a previous 'if'
       else if(c==0) cout<<"None"<