/*
*copyright (c) 2014, 烟台大学计算机学院.
*All rights reserved.
*文件名称:test.cpp
*作者:陆云杰
*完成日期:2014年10月23日
*版本号:v1.0
*
*
*问题描述:鸡翁一五钱,几母一之钱三,鸡雏一,值钱一,百钱买百鸡
*/
#include <iostream>
using namespace std;
int main()
{
int x,y,z,count=0;
for(x=0; x<=20; ++x)
for(y=0; y<=33; ++y)
for(z=0; z<=100; z+=3)
if(5*x+3*y+z/3==100&&x+y+z==100)
{
++count;
cout<<count<<":"<<x<<","<<y<<","<<z<<endl;
}
return 0;
}