public class 百钱买百ji {
public static void main(String[] args) {
//把公鸡,母鸡,小鸡遍历一遍
for (int i = 0; i <=20; i++) {
for (int j = 0; j <=33; j++) {
for (int j2 = 0; j2 <=100; j2++) {
if(i+j+j2100 && 5i+3j+j2/3100&&j2%3==0){
System.out.println(“公鸡数”+i+“只”+“母鸡数”+j+“只”+“小鸡数”+j2+“只”);
}
}
}
}
}
}