Advertisement
boyan1324

23401

Feb 13th, 2024
1,152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.76 KB | None | 0 0
  1. from math import ceil
  2. laps = []
  3. N = int(input())
  4. for i in range(1, N):
  5.     times = int(input())
  6.     laps.append(times)
  7. print(f"Count of laps: {len(laps)}")
  8. print(f"List of laps: {laps}")
  9. print(f"Fastest lap: {min(laps)}")
  10. print(f"Slowest lap: {max(laps)}")
  11. print(f"Total time of laps: {sum(laps)}")
  12. print(f"Average laps time: {ceil(laps / sum(laps))}")
  13.  
  14. laps = []
  15. while True:
  16.     command = input()
  17.     if command == "stop":
  18.         break
  19.     laps.append(int(command))
  20. print(f"Count of Monza lap: {len(laps)}")
  21. print(f"List of laps: {laps}")
  22. print(f"Fastest lap: {min(laps)}")
  23. print(f"SLowest lap: {max(laps)}")
  24. print(f"Total laps time: {sum(laps)/60}:{sum(laps)}")
  25. print(f"Average lap time: {((len(laps) / sum(laps))/60):02d}:{(len(laps) % 60):02d}")
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement