| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135736 | 陈骏睿 | 百钱买百鸡II | C++ | Compile Error | 0 MS | 0 KB | 641 | 2025-11-08 12:15:40 |
#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; }
Main.cc: In function 'int main()':
Main.cc:16:17: error: expected '}' before 'else'
else if(c==0) cout<<"None"<