Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. import math
  2.  
  3. rekord = float(input())
  4. razstoqnie = float(input())
  5. sec_per_m = float(input())
  6.  
  7. negovoto_vreme = razstoqnie * sec_per_m
  8. s_voda = math.floor((razstoqnie / 15)) * 12.5
  9.  
  10.  
  11. kraino_vreme = negovoto_vreme + s_voda
  12. nedostig = rekord - kraino_vreme
  13.  
  14. if kraino_vreme > rekord:
  15.     print(f'No, he failed! He was {-nedostig:.2f} seconds slower.')
  16. else:
  17.     print(f'Yes, he succeeded! The new world record is {kraino_vreme:.2f} seconds.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement