/*<p>1. (百钱买百鸡)雄鸡7元1只,母鸡5元1只,小鸡1元3只。花100元钱,买100只鸡,如果雄鸡、母鸡和小鸡都必须有,则雄鸡、母鸡和小鸡各买几只?</p>*/
#include<iostream>
#include<string>
using namespace std;
void main()
{
int gj, mj, xj;
for (gj = 1; gj < 15; gj++)
{
for (mj = 1; mj <= 20; mj++)
{
for ( xj = 3; xj <=100; xj+=3)
{
if ((gj+mj+xj==100)&&(7*gj+5*mj+1/3*xj))
{
cout << gj << ' ' << mj << ' ' << xj << endl;
return;
}
}
}
}
cout << "no answer" << endl;
}