Skip to content

Instantly share code, notes, and snippets.

@pcchou
Last active April 7, 2022 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcchou/6e5d5a77ebf8aae55f92a5797f587759 to your computer and use it in GitHub Desktop.
Save pcchou/6e5d5a77ebf8aae55f92a5797f587759 to your computer and use it in GitHub Desktop.
3052 海芭樂愛的大冒險III
n = int(input())
score = {}
for _ in range(n):
name, status = input().split()
if status == "AC":
if name in score:
score[name] += 1
else:
score[name] = 1
max_score = 0
ans = ""
for name in score:
if score[name] >= max_score:
max_score = score[name]
ans = name
print(ans)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment