Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135738 任艺宸 百钱买百鸡II C++ Accepted 30 MS 272 KB 615 2025-11-08 12:16:59

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