解题思路:
注意事项:
参考代码:
Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine()); String regex = "\\s"; while(sc.hasNext()) { String s = sc.nextLine(); if(n > 0) { n --; System.out.println(s + "\n"); continue; } String[] arr = s.split(regex); for (int i = 0; i < arr.length; i++) { System.out.println(arr[i] + "\n"); } }
0.0分
2 人评分