Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147753 杜春雨 百钱买百鸡II C++ Accepted 25 MS 272 KB 533 2026-02-07 15:08:45

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