#include
int main( void )
{
//W= (d+2*m+3*(m+1)/5+y+y/4-y/100+y/400) mod 7
int w, d, m, y;
char day[][10]={"Mon", "Tue", "Wen", "Thu", "Fri", "Sat","Sun"};
scanf("%d%d%d", &y, &m, &d);
if(m<=2) y--, m+=12;
w = (d+2*m+3*(m+1)/5+y+y/4-y/100+y/400) % 7;
printf("%s\n", day[w]);
}
阅读(829) | 评论(0) | 转发(0) |