Run ID:115598
提交时间:2025-03-31 20:56:07
#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,d=0; cin>>N; for(int x=0;x<=N;x++){ for(int y=0;y<N/3;y++){ for(int z=0;z<N/3;z++){ if(x+y+z*3==N&&5*x+3*y+z==N){ d++; cout<<d<<':'<<x<<','<<y<<','<<z*3<<endl; } } } } if(d==0){ cout<<"None"<<endl; } return 0; }