第二题代码: public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); String num = cin.nextLine(); String[] nums = num.split(" "); int n = Integer.parseInt(nums[0]); //红球数量 int m = Integer.parseInt(nums[1]); //...