11557 : 양조장의 해

서희찬·2021년 8월 29일
0

백준

목록 보기
18/105

문제

코드

T = int(input())
for __ in range(T):
    dictionary = {}
    maxA = 0 
    numSchool = int(input()) 
    for i in range(numSchool):
        a, b = input().split()
        dictionary[int(b)] = a
    for j in dictionary.keys():
        if maxA<j :
            maxA = j
    print(dictionary[maxA]) 

해설

딕셔너리 = key : value 를 활용했다.

profile
Carnegie Mellon University Robotics Institute | Research Associate | Developing For Our Lives, 세상에 기여하는 삶을 살고자 개발하고 있습니다

0개의 댓글

관련 채용 정보