private static void chickenCount() { for (int i = 0; i <= 100/5; i++) { for (int j = 0; j <= (100 - 5 * i)/3; j++) { int c = (100 - 5 * i - 3 * j) * 3; if(i + j + c == 100){ System.out.println("公鸡:"+i+",母鸡:"+j+",小鸡:"+c); } } }}