Sichanov

07_world_swimming_record

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