Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. hour = int(input())
  2. minutes = int(input())
  3. new_minutes = minutes + 15
  4. if new_minutes < 60:
  5. print(str(hour) + ':' + str(new_minutes))
  6.  
  7. elif new_minutes >= 60 and hour + 1 < 24:
  8. hour = hour + 1
  9. new_minutes = new_minutes - 60
  10. print(str(hour) + ':' + str(format(new_minutes, '02d')))
  11.  
  12. elif new_minutes >= 60 and hour + 1 >= 24:
  13. hour = 0
  14. new_minutes = new_minutes - 60
  15. print(str(hour) + ':' + str(format(new_minutes, '02d')))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement