[백준 1476][Python] 날짜 계산

봉글렛·2023년 1월 2일

백준

목록 보기
18/55

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

풀이

e, s, m = 0, 0, 0
result = 0
a, b, c = map(int, input().split())

while True:
    if e == a and s == b and m == c:
        print(result)
        break
    else:
        e += 1
        s += 1
        m += 1
        result += 1
        if e == 16:
            e = 1
        if s == 29:
            s = 1
        if m == 20:
            m = 1
profile
어쩌다 개발자 (할 수 있을 때까지!!!!)

0개의 댓글