SHARE
TWEET

07. World Swimming Record

omnilog Sep 21st, 2019 (edited) 135 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top