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: 6ms
Memory: 1092kB
Author: 2018212212052
In contest: 1273

#include<stdio.h> 
	int main(){
		int a,b,c;
	char *w[7]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
	while(scanf("%d%d%d",&a,&b,&c)!=EOF){
		if(b<3)
	    { b+=12; a--; } 
	printf("%s\n",w[(c+1+2*b+3*(b+1)/5+a+a/4-a/100+a/400)%7]); 
	} 
	return 0;
	}