Run ID:157727
提交时间:2026-08-16 11:48:56
#include<bits/stdc++.h> using namespace std; int main() { int n,c=0; cin>>n; for(int g=0;g<n/3;g++){ for(int m=0;m<n/3;m++){ for(int x=0;x<n/3;x++){ if(g+m+x*3==n&&5*g+3*m+x==n){ c++; cout<<c<<":"<<g<<","<<m<<","<<x<<endl; } } } } if(c==0){ cout<<"Nome"; } return 0; }