Run ID:97460
提交时间:2024-11-15 23:01:14
#include<bits/stdc++.h> using namespace std; int main() { int n,x,y,z,sum=0; bool s=0; cin>>n; for(int x=0;x<=n/5;x++){ for(int y=0;y<=n/3;y++){ for(int z=0;z<=0;z++){ if(x+y+z==n&&5*x+3*y+z/3.0==n){ s=1; sum++; cout<<sum<<": "<<x<<","<<y<<","<<z; } } } } if(s==0){ cout<<"None"; } return 0; }