#include<stdio.h>
void main()
{
int x,y,z;
for(x=1;x<=32;x++)
{ for(y=1;y<=48;y++)
{ z=100-x-y;
if((z%3==0)&&(3*x+2*y+z/3==100))
{ printf("hen=%d,cock=%d,chicken=%d\n",x,y,z);
goto laber;
}
}
}
laber:;
}
原文地址:https://www.cnblogs.com/zhangdemingQ/p/12096028.html
时间: 2024-11-05 23:28:28