month_and_day = input().split(' ')
month = int(month_and_day[0])
day = int(month_and_day[1])
day_of_month = {'1':31, '2':28, '3':31, '4':30, '5':31, '6':30, '7':31, '8':31, '9':30, '10':31, '11':30, '12':31}
day_of_the_week = {'0':'SUN', '1':'MON', '2':'TUE', '3':'WED', '4':'THU','5':'FRI','6':'SAT'}
total = 0
for i in range(1, month):
total += day_of_month[str(i)]
total += day
print(day_of_the_week[str(total % 7)])
'# 코딩 문제 관련 > 파이썬' 카테고리의 다른 글
Baekjoon 11720번(python) (0) | 2019.04.25 |
---|---|
Baekjoon 8393번(python) (0) | 2019.04.25 |
Baekjoon 2441번(python) (0) | 2019.04.25 |
Baekjoon 2440번(python) (0) | 2019.04.25 |
Baekjoon 2439번(python) (0) | 2019.04.25 |