Advertisement
veronikaaa86

01. Sum Seconds

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