-
[python]백준 2007년 1924번알고리즘 문제풀이/백준(파이썬) 2023. 5. 4. 20:39
코드
import sys import datetime sys.stdin = open("1924.txt", "r") a,b=map(int,input().split())#a월 b일 d=datetime.datetime(2007,a,b)#문제에서 2007년 a월b일 d할당하고 z=['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT','SUN'] #z는월~일 #d.weekday에서 월0,화1,수2,목3,금4,토5,일6 for i in range(7):#0~6 if d.weekday()==i: print(z[i])
링크
https://www.acmicpc.net/problem/1924
'알고리즘 문제풀이 > 백준(파이썬)' 카테고리의 다른 글
[python]백준 멘토와 멘티 26265번 (0) 2023.05.05 [python]백준 2009년 2948번 (0) 2023.05.04 [python]백준 카트라이더: 드리프트 27522번 (0) 2023.05.03 [python]백준 가희와 열리지 않는 건널목 27885번 (0) 2023.05.02 [python]백준 화성 수학 5355번 (0) 2023.05.01