import java.util.Calendar; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner console = new Scanner(System.in); int year = console.nextInt(); //write your code here...... Calendar c=Calendar.getInstance(); for(int i=1;i<=12;i++) { c.set(year,i,1); c.add(Calendar.DATE,-1); int date=c.get(Calendar.DATE); System.out.println(year+"年"+i+"月:"+date+"天"); } } }