Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
537 B
1
Indexable
Never
from math import floor
 
world_record = float(input())
distance = float(input())
time_in_seconds = float(input())
 
water_resistance = floor(distance / 15) * 12.5
ivan_stats = distance * time_in_seconds
total_time = ivan_stats + water_resistance
 
time_more = abs(world_record - total_time)
time_less = total_time - world_record
 
if total_time >= world_record:
    print(f'No, he failed! He was {time_more:.2f} seconds slower.')
 
else:
    print(f'Yes, he succeeded! The new world record is {total_time:.2f} seconds.')
Leave a Comment