Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- record_in_sec = float(input())
- distance_in_meter = float(input())
- time_in_sec = float(input())
- climb_distance_sec = distance_in_meter * time_in_sec
- slow = (math.floor(distance_in_meter / 50)) * 30
- total_time = climb_distance_sec + slow
- of_target = abs(record_in_sec - total_time)
- if total_time >= record_in_sec:
- print(f"No! He was {of_target:.2f} seconds slower.")
- else:
- print(f'Yes! The new record is {total_time:.2f} seconds.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement