import org.w3c.dom.css.Counter;
public class T02 {
public static void main(String[] args) {
// 100块砖100人来搬,男人一人搬4块,女人一人搬3块,小孩3人抬一块,问男人、女人和小孩各几人?
for (int i = 0; i < 100; i++) {
for (int j = 0; j <100; j++) {
for (int j2 = 0; j2 < 100; j2++) {
if (i+j+j2==100&&4*i+3*j+j2/3==100&&j2%3==0) {
System.out.print("男人:"+i);
System.out.print("女人:"+j);
System.out.print("小孩:"+j2);
System.out.println("");
}
}
}
}
}
}
06-28
3159
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-02