文章
81
粉丝
2
获赞
544
访问
18.1k
#include <iostream>
using namespace std;
int main(){
int n;
while(cin >> n){
for(int x = 0; x <= 100; x++){
for(int y = 0; y <= 100; y++){
int z = 100 - x - y;
if(z < 0) continue;
if(5 * x + 3 * y + z / 3.0 <= n){
cout << "x=" << x
<< ",y=" << y
<< ",z=" << z << endl;
}
}
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发