Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. import math
  2.  
  3. record_in_sec = float(input())
  4. distance_in_meter = float(input())
  5. time_in_sec = float(input())
  6.  
  7. climb_distance_sec = distance_in_meter * time_in_sec
  8. slow = (math.floor(distance_in_meter / 50)) * 30
  9.  
  10. total_time = climb_distance_sec + slow
  11. of_target = abs(record_in_sec - total_time)
  12.  
  13. if total_time >= record_in_sec:
  14.     print(f"No! He was {of_target:.2f} seconds slower.")
  15. else:
  16.     print(f'Yes! The new record is {total_time:.2f} seconds.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement