// 构造矩阵 Scanner sc = new Scanner(System.in); String[] split = sc.nextLine().split(","); int width = Integer.parseInt(split[0]); int length = Integer.parseInt(split[1]); int side = Integer.parseInt(split[2]); int sum = Integer.parseInt(split[3]); int[][] matrix = new int[width][length]; for (int i = 0; i < width; i++) { String[] m = sc.nextLine().split(","); for (int j = 0; j < m.length; j++) { matrix[i][j] = Integer.parseInt(m[j]); } }