Run ID:162842
提交时间:2026-10-21 19:14:38
#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(){ long long s=1,n,x,y,z; cin>>n; for(x=0;x<n;x++){ for(y=0;y<n;y++){ for(z=0;z<n;z++){ if(x+y+z==n&&5*x+3*y+z/3.0==n){ cout<<s<<": "<<x<<','<<y<<','<<z<<endl; s++; } } } } if(s==1){ cout<<"None"<<endl; } return 0; }