← Back to List

9698번: SAHUR & IMSA’ ↗

Solutions

Python 3
161 B | 161 chars
for tc in range(1, int(input()) + 1):
  h, m = map(int, input().split())
  
  t = ((h * 60 + m - 45) + 1440) % 1440
  
  print(f"Case #{tc}: {t // 60} {t % 60}")