[백준 1308][Python] D-Day

봉글렛·2022년 12월 24일

백준

목록 보기
3/55

문제 링크 https://www.acmicpc.net/problem/1308

그냥 풀만했다... 하지만 좋은 코드는 아니다.

풀이

import datetime
a, b, c = map(int, input().split())
start = datetime.date(a, b, c)
temp = datetime.date(a+1000, b, c)
a, b, c = map(int, input().split())
end = datetime.date(a, b, c)
result = (start-end).days
if end >= temp:
    print("gg")
else:
    print('D'+str(result))
profile
어쩌다 개발자 (할 수 있을 때까지!!!!)

0개의 댓글