Run ID:136108

提交时间:2025-11-09 15:40:45

#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<<"None"; } return 0; }