Beakjoon&프로그래머스/파이썬

[백준/파이썬] 8638번 Zwycięzcy

현장 2023. 11. 13. 17:29

-Code

arr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

n = int(input())
nums = list(map(int, input().split()))
max_score = max(nums)

res = []

for num in nums:
    if max_score == num:
        p = nums.index(num)
        res.append(arr[p])
        nums[p] = -1

print(*res, sep='')