import java.util.*; public class Main { // 这里1月对应monthDay[1]更符合现实思维 // 如果用前缀和的思想,下面就不用for循环了... private static int[] monthDay = new int[]{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; public static void main(String[] args) { Scanner sc = new Scanner(System.in); ...