본문 바로가기

코딩 테스트/백준

[Python] 백준 2884 알람 시계

 

정답 코드

import sys
input = sys.stdin.readline

h, m = map(int, input().split())

m = m - 45
if m < 0 :
    m += 60
    h -= 1
    if h < 0 :
        h += 24

print(h,m)

'코딩 테스트 > 백준' 카테고리의 다른 글