Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- record_sec = float(input())
- distance_metric = float(input())
- time_1metric = float(input())
- need_time = distance_metric * time_1metric
- need_time_slow = math.floor(distance_metric/50)
- need_time_slow1 = need_time_slow * 30
- all_time_need = need_time_slow1 + need_time
- shorter_seconds = abs(record_sec - all_time_need)
- if all_time_need >= record_sec:
- print (f"No! He was {shorter_seconds:.2f} seconds slower.")
- else:
- print(f"Yes! The new record is {all_time_need:.2f} seconds.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement