Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
162842 成书骏 百钱买百鸡II C++ Accepted 569 MS 272 KB 653 2026-10-21 19:14:38

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