Advertisement
veronikaaa86

01. Sum Seconds

Jul 9th, 2023 (edited)
875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. first_time = int(input())
  2. second_time = int(input())
  3. third_time = int(input())
  4.  
  5. sum_sec = first_time + second_time + third_time
  6.  
  7. minutes = sum_sec // 60
  8. seconds = sum_sec % 60
  9.  
  10. # print(f"{minutes}:{seconds:02}")
  11.  
  12. if seconds < 10:
  13.     print(f"{minutes}:0{seconds}")
  14. else:
  15.     print(f"{minutes}:{seconds}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement