본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#57 백준 파이썬 [2884] 알람시계

https://www.acmicpc.net/problem/2884

 

 

#Solution

 

hour,minute = map(int, input().split())

if minute > 44:
    print(hour, minute-45)
elif minute <= 44 and hour >= 1:
    print(hour-1, minute+15)
else:
    print(23, minute+15)