//输入2000年的月日得出是星期几
#include <stdio.h>
int main(void)
{
int
month, day, leap, sum, i, a[7], j;
scanf("%d, %d", &month, &day);
if (2000 % 400 == 0)
leap = 1;
switch (month)
{
case 1:
sum = 0;
break;
case 2:
sum = 31;
break;
case 3:
sum = 60;
break;
case 4:
sum = 91;
break;
case 5:
sum = 121;
break;
case 6:
sum = 152;
break;
case 7:
sum = 182;
break;
case 8:
sum = 213;
break;
case 9:
sum = 244;
break;
case 10:
sum = 274;
break;
case 11:
sum = 305;
break;
case 12:
sum = 335;
break;
default:
printf("error day");
break;
}
sum = sum + day;
//判断中的天数;
i = sum % 7;
//由于1.1号是星期6;
a[1] = 6;
a[2] = 7;
a[3] = 1;
a[4] = 2;
a[5] = 3;
a[6] = 4;
a[7] = 5;
// j = a[i];
printf("星期%d\n", a[i]);
return 0;
}