Run ID:135735

提交时间:2025-11-08 12:14:31

#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,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+3*z && N==5*x+3*y+z){ c++; cout<<c<<':'<<" "<<x<<','<<y<<','<<z*3<<endl; } } } } return 0; }