Advertisement
peterkk

Time + 15 Minutes

Jul 13th, 2020
1,122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. # Time + 15 Minutes
  2. hours = int(input())
  3. minutes = int(input())
  4.  
  5. total_minutes = hours * 60 + minutes + 15
  6.  
  7. hours = total_minutes // 60
  8. minutes = total_minutes % 60
  9.  
  10. if hours >= 24:
  11.     hours -= 24
  12.  
  13. print(f'{hours}:', end='')
  14.  
  15. if minutes < 10:
  16.     print(f'0{minutes}')
  17. else:
  18.     print(minutes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement