public class BuyChicken{
public static void main(String[] args){
for(int o = 0;o<= 20;o++){
for(int t = 0;t<=34;t++){
for(int w = 0; w<=300;w++){
if(((o+t+w)==100) && ((5*o + 3*t + w/3) == 100) && (w % 3 == 0)){
System.out.println("公鸡:" + o + " 母鸡:" + t + " 小鸡:" + w);
}
}
}
}
}
}
百钱买百鸡
最新推荐文章于 2025-05-20 22:23:34 发布