Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117930 | 罗子童 | 百钱买百鸡II | C++ | Compile Error | 0 MS | 0 KB | 617 | 2025-04-20 19:16:15 |
#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 N,f; cin>>N; for(int a=0;a<=N/5;a++){ for(int b=0;b<=N/3;b++){ for(int c=0;c<=N/3;c++){ if(a+b+c*3==n&&5*a+3*b+c==n) f++; cout<<f<<": "<<a<<","<<b<<","<<3*c<<endl; } } } if(f==0) cout<<"noec"; return 0; }
Main.cc: In function 'int main()': Main.cc:12:29: error: 'n' was not declared in this scope if(a+b+c*3==n&&5*a+3*b+c==n) ^