Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- d = {}
- for i in range(n):
- s = input().split()
- if s[0] not in d:
- d[s[0]] = [0,0,0,0,0,0]
- if s[1] == "2pt":
- d[s[0]][3] += 1
- if s[3] == "Made":
- d[s[0]][0] += 1
- if s[1] == "3pt":
- d[s[0]][4] += 1
- if s[3] == "Made":
- d[s[0]][1] += 1
- if s[1] == "FT":
- d[s[0]][5] += 1
- if s[3] == "Made":
- d[s[0]][2] += 1
- ans = []
- t = 0
- for i in d.keys():
- s = 0
- s += d[i][3] - d[i][0]
- s += d[i][4] - d[i][1]
- s += d[i][5] - d[i][2]
- if s > t:
- t = s
- ans = [i]
- elif s == t:
- ans.append(i)
- print(len(ans))
- ans.sort()
- for i in ans:
- print(i, end=" ")
- print(d[i][0], "/", d[i][3], " 2pt, ", end="", sep="")
- print(d[i][1], "/", d[i][4], " 3pt, ", end="", sep="")
- print(d[i][2], "/", d[i][5], " FT, ", end="", sep="")
- 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