Advertisement
aneliabogeva

Sum Seconds

Apr 15th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. firstPlayer = int(input())
  2. secondPlayer = int(input())
  3. thirdPlayer = int(input())
  4.  
  5. totalTimeInMin = (firstPlayer + secondPlayer + thirdPlayer)/60
  6. totalTimeSeconds = (firstPlayer + secondPlayer + thirdPlayer) % 60
  7.  
  8. if totalTimeSeconds < 10:
  9. print(f"{int(totalTimeInMin)}:0{totalTimeSeconds}")
  10. else:
  11. print(f"{int(totalTimeInMin)}:{totalTimeSeconds}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement