Advertisement
veronikaaa86

03. Time + 15 Minutes

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