动态规划解法 public static void main(String[] args) { Scanner sc = new Scanner(System.in); int apple = sc.nextInt(); &...