Run ID:8226
提交时间:2025-06-19 20:37: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 n,a=1,b=0; cin>>n; for(int x=0;x<=n;x++){ for(int y=0;y<=n;y++){ for(int z=0;z<=n;z++){ if(x+y+z==n){ if(x*5+y*3+z/3==n&&z%3==0){ cout<<a<<":"<<" "<<x<<","<<y<<","<<z<<endl; a++; b++; } } } } } if(b==0){ cout<<"None"<<endl; } return 0; }