bl00dt3ars

07. World Swimming Record

Oct 12th, 2020 (edited)
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. import math
  2.  
  3. record = float(input())
  4. distance = float(input())
  5. time_for_one_m = float(input())
  6. delay = math.floor(distance / 15) * 12.5
  7. time = distance * time_for_one_m + delay
  8.  
  9. if time < record:
  10.     print(f"Yes, he succeeded! The new world record is {time:.2f} seconds.")
  11. else:
  12.     print(f"No, he failed! He was {time - record:.2f} seconds slower.")
Add Comment
Please, Sign In to add comment