Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
162835 李亭绪 百钱买百鸡II C++ Accepted 580 MS 272 KB 645 2026-10-21 19:04:33

Tests(10/10):


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(){ long long n,s=1,x,y,z; cin>>n; for(x=0;x<n;x++){ for(y=0;y<n;y++){ for(z=0;z<n;z++){ if(x+y+z==n&&x*5+y*3+z/3.0==n){ cout<<s<<": "<<x<<','<<y<<','<<z<<endl; s++; } } } } if(s==1) cout<<"None"<<endl; return 0; }