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