https://www.acmicpc.net/problem/2884
2884 | 알람시계
hour, minute = map(int, input().split())
minute = minute - 45
if minute < 0:
hour -= 1
minute += 60
if hour < 0:
hour += 24
print(hour, minute)
hour, minute = map(int, input().split())
minute -= 45
if minute < 0:
hour -= 1
print(hour%24, minute%60)
print(-20 % 60)
>> 40