自己本地IDE能过 为什么提交就是0呢,感谢大佬 import java.util.ArrayList; import java.util.Scanner; class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNextInt()) { int n = sc.nextInt(); int[] nodenum = new int[n]; ...