Advertisement
veronikaaa86

03. Time + 15 Minutes

Jul 9th, 2023
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. init_hour = int(input())
  2. init_minutes = int(input())
  3.  
  4. total_time_min = (init_hour * 60) + init_minutes + 15
  5.  
  6. hour = total_time_min // 60
  7. minutes = total_time_min % 60
  8.  
  9. if hour > 23:
  10.     hour = 0
  11.  
  12. print(f"{hour}:{minutes:02}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement