Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115596 郝王骏程 百钱买百鸡II C++ Compile Error 0 MS 0 KB 620 2025-03-31 20:54:20

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(int x=0;x<=n/5;x++){ for(int y=0;y<=n/3;y++){ for(int z=0;z<=n/3;z++){ if(i+j+k*3==n&&5*i+3*j+k==n){ c++; cout<<c<<": "<<x<<","<<y<<","<<z*3<<endl; } } } } if(c==0) cout<<"None"<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:20: error: 'i' was not declared in this scope
                 if(i+j+k*3==n&&5*i+3*j+k==n){
                    ^
Main.cc:13:22: error: 'j' was not declared in this scope
                 if(i+j+k*3==n&&5*i+3*j+k==n){
                      ^
Main.cc:13:24: error: 'k' was not declared in this scope
                 if(i+j+k*3==n&&5*i+3*j+k==n){
                        ^
Main.cc:8:9: warning: unused variable 'x' [-Wunused-variable]
     int x,y,z,n,c=0;
         ^
Main.cc:8:11: warning: unused variable 'y' [-Wunused-variable]
     int x,y,z,n,c=0;
           ^
Main.cc:8:13: warning: unused variable 'z' [-Wunused-variable]
     int x,y,z,n,c=0;
             ^