Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import floor
- record_in_seconds = float(input())
- distance = float(input())
- seconds_per_meter = float(input())
- total_swimming_time = distance * seconds_per_meter
- resistance = floor(distance / 15) * 12.5
- ivan_time = total_swimming_time + resistance
- if record_in_seconds < ivan_time:
- print(f"No, he failed! He was {ivan_time - record_in_seconds:.2f} seconds slower.")
- elif ivan_time < record_in_seconds:
- print(f"Yes, he succeeded! The new world record is {ivan_time:.2f} seconds.")
Add Comment
Please, Sign In to add comment