Start: Jun, 26, 2019 08:30:00
2019年度暑期短学期第一天
End: Jun, 26, 2019 11:30:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 5ms
Memory: 1092kB
Author: 2018212212138
In contest: 1273

#include<stdio.h>


int main()
{
	int year,month,day;
	
	while(scanf("%d%d%d",&year,&month,&day)!=EOF)
	{
		int iWeekDay=-1;
    	if(1==month||2==month)
    	{
	    	month+=12;
	    	year--;
    	}
    	iWeekDay=(day+1+2*month+3*(month+1)/5+year+year/4-year/100+year/400)%7;
    	if(iWeekDay==0)
	{
	    printf("Sunday\n");
	}
    	if(iWeekDay==1)
	{
	    printf("Monday\n");
	}
    	if(iWeekDay==2)
 	{
	    printf("Tuesday\n");
	}
    	if(iWeekDay==3)
	{
	    printf("Wednesday\n");
	}
    	if(iWeekDay==4)
	{
	    printf("Thursday\n");
	}
    	if(iWeekDay==5)
	{
	    printf("Friday\n");
	}
    	if(iWeekDay==6)
 	{
	    printf("Saturday\n");
	}

	}
}