Advertisement
omnilog

07. World Swimming Record

Sep 21st, 2019
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. import math
  2.  
  3. record = float(input())
  4. distance = float(input())
  5. time = float(input())
  6.  
  7. first_time = distance * time
  8. delay_distance = distance / 15.0
  9. delay_time = math.floor(delay_distance) * 12.5
  10. real_time = first_time + delay_time
  11.  
  12. if real_time >= record: # тук трябваше да добавя един знак за равно /благодаря на колегата grishko0o/
  13.     real_time -= record
  14.     print(f'No, he failed! He was {real_time:.2f} seconds slower.')
  15. elif real_time < record:
  16.     print(f'Yes, he succeeded! The new world record is {real_time:.2f} seconds.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement