-코드
for _ in range(int(input())):
cost = 0
result = ''
for _ in range(int(input())):
c, name = input().split()
if int(c) > cost:
cost = int(c)
result = name
print(result)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 9455번 박스 (0) | 2022.02.19 |
---|---|
[백준/파이썬] 11068번 회문인 수 (0) | 2022.02.18 |
[백준/파이썬] 1969번 DNA (0) | 2022.02.17 |
[백준/파이썬] 10801번 카드게임 (0) | 2022.02.17 |
[백준/파이썬] 2947번 나무 조각 (0) | 2022.02.16 |