Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7010 张育斌 百钱买百鸡II C++ Compile Error 0 MS 0 KB 583 2025-03-29 15:40:16

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 z,n,cnt; cin>>n; for(int x=0;x<=n/5;x++){ for(int y=0;y<n/3;y++){ z=n-x-y; if( x+y+z==n && 5*x+3*m+x/3==n && z%3==0){ cout<<++cnt<<": "<<x<<","<<y<<","<<z<<endl; } else cout<<"None"; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:35: error: 'm' was not declared in this scope
             if( x+y+z==n && 5*x+3*m+x/3==n && z%3==0){
                                   ^