百钱百鸡

来源:互联网 发布:window 查看端口 编辑:程序博客网 时间:2024/05/29 03:38
public static void main(String[] args) {for(int x = 0; x <= 20; x++) {for(int y = 0; y <= 33; y++) {int z = 100 - x - y;if(5 * x + 3 * y + z / 3 == 100 && z % 3 == 0) {System.out.printf("%d, %d, %d\n", x, y, z);}}}}}

0 0
原创粉丝点击