Run ID:96856
提交时间:2024-11-09 17:01:55
#include<bits/stdc++.h> using namespace std; int main(){ int n,s = 0; cin>>n; for (int x = 1;x <= n / 5;x++){ for (int y = 1;y <= n / 3;y++){ for (int z = 1;z <= n / (z / 5);z++){ if(x+y+z == n && 5*x+3*y+z/5==n&&z%5==0){ cout<<x<<":"<<" "<<x<<","<<y<<","<<z<<endl; s = 1; } } } } if (s == 0){ cout<<"None"; } return 0; }