#include<iostream>
using namespace std;
int main()
{
int n,x, y, z;
cin >> n;
for(x=0;x<=100;x++)
for(y=0;y<=100;y++)
for (z = 0; z <= 100; z++)
{
if (x + y + z == 100 && 5 * x + 3 * y + z/3 == n&&z%3==0)
cout << "x=" << x <<"," << "y=" << y << "," << "z=" << z << '\n';
}
return 0;
}
百鸡问题C++
最新推荐文章于 2024-06-05 20:54:12 发布