Advertisement
HristoBaychev

Sum Seconds

Jan 28th, 2023
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import math
  2.  
  3. timeFirst = int(input())
  4. timeSec = int(input())
  5. timeThird = int(input())
  6.  
  7. totalTime = timeFirst + timeSec + timeThird
  8.  
  9. minutes = totalTime // 60
  10. seconds = totalTime % 60
  11.  
  12. minutes = math.floor(minutes)
  13.  
  14. if seconds < 10:
  15.     print(f"{minutes}:0{seconds}")
  16. else:
  17.     print(f"{minutes}:{seconds}")
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement