https://programmers.co.kr/learn/courses/30/lessons/12901#
ํ์ด
# ํ๋ก๊ทธ๋๋จธ์ค 1๋จ๊ณ - 2016
def solution(a, b):
date = ['FRI', 'SAT', 'SUN', 'MON', 'TUE', 'WED', 'THU']
month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
answer = date[(sum(month[:a-1])+b-1)%7]
print(type(answer))
return answer
datetime์ ์ด์ฉํ์ฌ ํ์ด
import datetime
def getDayName(a,b):
t = 'MON TUE WED THU FRI SAT SUN'.split()
return t[datetime.datetime(2016, a, b).weekday()]