import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); List<Integer> num = new ArrayList(); // 注意 hasNext 和 hasNextLine 的区别 if (in.hasNextInt()) { int a = in.nextInt()...