Advertisement
veronikaaa86

03. Time + 15 Minutes

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