๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Algorithm/๋ฐฑ์ค€(BOJ)

[ ํŒŒ์ด์ฌ(python) ] ๋ฐฑ์ค€ 2948 - 2009๋…„

by YWTechIT 2021. 5. 11.
728x90

๐Ÿ“ ๋ฐฑ์ค€ 2948 - 2009๋…„

๋ฐฑ์ค€ 2948 - 2009๋…„


โšก๏ธ ๋‚˜์˜ ํ’€์ด

์ €๋ฒˆ์— ํ’€์—ˆ๋˜ 2007๋…„๊ณผ ๋™์ผํ•œ ์œ ํ˜•์ด๋‹ค. ๋‹ค๋งŒ, ๋ฌธ์ œ์— ์œค๋…„์ด๋ผ๊ณ  ์ฃผ์–ด์ ธ์žˆ์ง€ ์•Š๊ธฐ๋•Œ๋ฌธ์— 2์›”์€ 28์ผ๋กœ ์ƒ๊ฐํ•˜๊ณ  ํ’€๋ฉด ๋œ๋‹ค.

months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
days = ["Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"]
D, M = map(int, input().split())
print(days[(sum(months[:M-1]) + D) % 7])
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€