第二题给你一个坐标x,y。问从0,0像素点的左下角到x,y像素点的右上角经过多少个像素点。大家做了几道题```javaimport java.util.Scanner;// 注意类名必须为 Main, 不要有任何 package xxx 信息public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); // 注意 hasNext 和 hasNextLine 的区别 int x = in.nextInt(); int y = in.nextInt(); // RuntimeException runtimeException = new RuntimeException(x+" "+y); // throw runtimeException; if (x == y) { System.out.println(x + 1); return; } if (y > x) { int temp = x; x = y; y = temp; } int gcd = get(x + 1, y + 1); if (gcd == 1) { System.out.println(x + y + 1); } else { int temp = (x + 1) / gcd - 1 + (y + 1) / gcd - 1 + 1; System.out.println(temp * gcd); } } static int get(int x, int y) { if (y == 0) { return x; } return get(y, x % y); }}```