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: 2018212212125
In contest: 1273

#include<cstdio>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#define ll long long 
using namespace std;
const int maxn = 110;
const int inf = 0x3f3f3f3f;
int n, m, k;
int a[maxn];
int main()
{
	while (scanf("%d %d %d", &n, &m, &k) != EOF)
	{
		if (m == 1 || m == 2)
			m += 12, n--;
		int t = (k + 1 + 2 * m + 3 * (m + 1) / 5 + n + n / 4 - n / 100 + n / 400) % 7;
		if (t == 0)
			printf("Sunday\n");
		if (t == 1)
			printf("Monday\n");
		if (t == 2)
			printf("Tuesday\n");
		if (t == 3)
			printf("Wednesday\n");
		if (t == 4)
			printf("Thursday\n");
		if (t == 5)
			printf("Friday\n");
		if (t == 6)
			printf("Saturday\n");


	}
	return 0;
}