Last active
April 7, 2022 19:15
-
-
Save pcchou/6e5d5a77ebf8aae55f92a5797f587759 to your computer and use it in GitHub Desktop.
3052 海芭樂愛的大冒險III
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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