#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,b;
printf("輸入年份和月份:");
scanf("%d%d",&a,&b);
if((a%4==0||a%100!=0)&&(a%400==0))
{
if(b==(1||3||5||7||8||10||12))
printf("這一年該月的天數爲31天\n");
else if(b==2)
printf("這一年該月的天數爲29天\n");
else
printf("這一年該月的天數爲30天\n");
}
else
{
if(b==(1||3||5||7||8||10||12))
printf("這一年該月的天數爲31天\n");
else if(b==2)
printf("這一年該月的天數爲28天\n");
else
printf("這一年該月的天數爲30天\n");
}
return 0;
}