想问下第一问的代码时类似这样的吗 public static void query(int n, int x, int y) { int min, max = 0; min = n - y - x/2; int yellowRemain = Math.max(0, x - n); max = yellowRemain + n - y; System.out.println(max + " " + min); }