Advertisement
Korotkodul

ИМТО N7

Feb 15th, 2022
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. n = int(input())
  2. d = {}
  3. for i in range(n):
  4. s = input().split()
  5. if s[0] not in d:
  6. d[s[0]] = [0,0,0,0,0,0]
  7. if s[1] == "2pt":
  8. d[s[0]][3] += 1
  9. if s[3] == "Made":
  10. d[s[0]][0] += 1
  11. if s[1] == "3pt":
  12. d[s[0]][4] += 1
  13. if s[3] == "Made":
  14. d[s[0]][1] += 1
  15. if s[1] == "FT":
  16. d[s[0]][5] += 1
  17. if s[3] == "Made":
  18. d[s[0]][2] += 1
  19. ans = []
  20. t = 0
  21. for i in d.keys():
  22. s = 0
  23. s += d[i][3] - d[i][0]
  24. s += d[i][4] - d[i][1]
  25. s += d[i][5] - d[i][2]
  26. if s > t:
  27. t = s
  28. ans = [i]
  29. elif s == t:
  30. ans.append(i)
  31. print(len(ans))
  32. ans.sort()
  33. for i in ans:
  34. print(i, end=" ")
  35. print(d[i][0], "/", d[i][3], " 2pt, ", end="", sep="")
  36. print(d[i][1], "/", d[i][4], " 3pt, ", end="", sep="")
  37. print(d[i][2], "/", d[i][5], " FT, ", end="", sep="")
  38. print("Total: ", d[i][0] * 2 + d[i][1] * 3 + d[i][2], " Points", sep="")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement