Advertisement
veronikaaa86

06. World Swimming Record

May 15th, 2022
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. record_seconds = float(input())
  2. distance = float(input())
  3. time_sec_one_meter = float(input())
  4.  
  5. total_time = distance * time_sec_one_meter
  6.  
  7. delay = distance // 15 * 12.5
  8. total_time = total_time + delay
  9.  
  10. if total_time < record_seconds:
  11. print(f"Yes, he succeeded! The new world record is {total_time:.2f} seconds.")
  12. else:
  13. diff = total_time - record_seconds
  14. print(f"No, he failed! He was {diff:.2f} seconds slower.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement