ydpetkov

time_+15_minutes

Jul 13th, 2022 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. hours = int(input())
  6. minutes = int(input())
  7. minutes = minutes + 15
  8.  
  9. if minutes > 59:
  10. minutes = minutes - 60
  11. hours = hours + 1
  12.  
  13. if hours > 23:
  14. hours = 0
  15.  
  16. if minutes > 9:
  17. print(f'{hours}:{minutes}')
  18.  
  19. else:
  20. print(f'{hours}:0{minutes}')
  21.  
  22.  
  23.  
  24.  
Add Comment
Please, Sign In to add comment