import java.text.DateFormat;

import java.text.ParseException;

import java.text.SimpleDateFormat;

import java.util.Calendar;

import java.util.Date;

import java.util.Scanner;


public class TimeCanner {


public static void main(String[] args) throws ParseException {

Scanner s=new Scanner(System.in);

System.out.println("输入年份:");

int year=s.nextInt();

System.out.println("输入月份:");

int month=s.nextInt();

String ss=year+"/"+month+"/01";

SimpleDateFormat f=new SimpleDateFormat("yyyy/MM/dd");

Date endtime=f.parse(ss);

Date startTime=f.parse("1900/01/01");

long d=(endtime.getTime()-startTime.getTime())/(24*60*60*1000);

System.out.println(d);

int temp=(int) (d%7)+1;

System.out.println("星期日\t星期一\t星期二\t星期三\t星期四\t星期五\t星期六");

int da=0;

switch(month){

case 1:case 3:case 5:case 7:case 8:case 10:case 12:

da=31;break;

case 4: case 6: case 9: case 11:

da=30;break;

case 2:if(year%400==0||(year%4==0&&year%100!=0)){

da=29;

}else{

da=28;

}break;

}

for(int i=0;i

System.out.print("\t");

}

int num=0;

int k=0;

for(int mo=1;mo<=da;mo++){

System.out.printf("%d\t",mo);

if((d+mo)%7==6){

System.out.println();

}

}


}


}