#include <stdio.h>
int main()
{
int year=0,month=0;
int total=0;
while(scanf("%d %d",&year,&month)!=EOF)
{
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
{
total=31;
printf("%d\n",total);
continue;
}
case 2:
{
if(year%4==0||(year%4==0&&year%100!=0))
{
total=29;
}
else
{
total=28;
}
printf("%d\n",total);
continue;
}
case 4:
case 6:
case 9:
case 11:
{
total=30;
printf("%d\n",total);
continue;
}
default:
{
printf("SB");
}
}
}
return 0;
}

京公网安备 11010502036488号