Guest User

dada

a guest
Jul 17th, 2025
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. from math import floor
  2.  
  3. record_in_seconds = float(input())
  4. distance = float(input())
  5. seconds_per_meter = float(input())
  6.  
  7. total_swimming_time = distance * seconds_per_meter
  8. resistance = floor(distance / 15) * 12.5
  9. ivan_time = total_swimming_time + resistance
  10.  
  11. if record_in_seconds < ivan_time:
  12. print(f"No, he failed! He was {ivan_time - record_in_seconds:.2f} seconds slower.")
  13. elif ivan_time < record_in_seconds:
  14. print(f"Yes, he succeeded! The new world record is {ivan_time:.2f} seconds.")
Add Comment
Please, Sign In to add comment