Run ID:136107
提交时间:2025-11-09 15:40:32
#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 x,y,z,N,a=1; cin>>N; for(int x=0;x<=N;x++){ y=(N-7*x)/4; z=6*x+3*y; if(x>=0 && y>=0 && z>=0 && x+y+z==N){ cout<<a<<": "<<x<<','<<y<<','<<z<<endl; a++; } } if(a==1) cout<<"Nome"; return 0; }