취준시절/프로그래머스
[프로그래머스] 2016년 - Python
MAYMIN
2021. 7. 9. 01:11
728x90
SMALL
def solution(a, b):
answer = ''
month = ['FRI', 'SAT', 'SUN', 'MON', 'TUE', 'WED', 'THU']
lastDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
answer = month[(sum(lastDays[:a - 1]) + b - 1) % 7]
return answer
728x90
LIST