Run ID:7000
提交时间:2025-03-29 15:33:46
#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=0; cin>>n; for(x=0;x<=n/5;x++){ for(y=0;y<=n/3;y++){ for(z=0;z<=n;z++){ if( x+y+z==n && 5*x+3*y+z/3==n && z%3==0){ a++; cout<<a<<": "<<x<<","<<y<<","<<z<<endl; } } } } if(a==0){ cout<<"None"; } return 0; }