Baekjoon Online Judge - 2884
Code (Python)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| H, M = input().split() hours = int(H) minutes = int(M) if minutes - 45 >= 0: h = str(hours) m = str(minutes - 45) print(h + ' ' + m) else: if hours == 0: h = str(23) else: h = str(hours - 1) m = str(minutes + 60 - 45) print(h + ' ' + m)
|