코딩테스트 연습

[파이썬] 백준: #2884 알람시계 #2525 오븐시계

콩콩(๓° ˘ °๓)♡ 2023. 1. 18. 18:26

 

 

H, M = map(int, input().split())
T=60*H+M
if T>=45:
    print((T-45)//60, (T-45)%60)
else:
    print((1440-45+T)//60, (1440-45+T)%60)

 

 

H, M = map(int, input().split())
C = int(input())
T=60*H+M
if T+C<1440:
    print((T+C)//60, (T+C)%60)
else:
    print((T+C-1440)//60, (T+C-1440)%60)