Run ID:160583
提交时间:2026-09-24 14:55:01
#include<bits/stdc++.h> using namespace std; int main() { int x,y,z; double n; cin>>n; for(x=0;x<=n/5;x++){ for(y=0;y<=n/3;y++){ z=100-x-y; if((x+y+z==100)&&(5*x+3*y+z/3.0<=n)){ cout<<"x="<<x<<",y="<<y<<",z="<<z<<endl; } } } return 0; }