ALEXANDAR_GEORGIEV

time

May 2nd, 2022 (edited)
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. time_first = int(input())
  2. time_second = int(input())
  3. time_third = int(input())
  4. total_time = time_first + time_second + time_third
  5. time_minute = total_time // 60
  6. time_sec = total_time - time_minute
  7. time_sec_time = (total_time % 60)
  8.  
  9. if time_sec_time <= 9:
  10.     print(f"{time_minute}:0{time_sec_time}")
  11. else:
  12.     print(f"{time_minute}:{time_sec_time}")
Add Comment
Please, Sign In to add comment