SWLUG/λ°±μ€€ BEAKJOON

[python/파이썬] λ°±μ€€ BEAKJOON 11557번: Yangjojang of The Year

waterproof 2023. 5. 31. 15:40

[python/파이썬] λ°±μ€€ BEAKJOON 11557번: Yangjojang of The Year

https://www.acmicpc.net/problem/11557

 

11557번: Yangjojang of The Year

μž…ν•™ OTλ•Œ λˆ„κ΅¬λ³΄λ‹€λ„ 남닀λ₯΄κ²Œ λ†€μ•˜λ˜ 당신은 μžμ—°μŠ€λŸ½κ²Œ 1ν•™λ…„ κ³ΌλŒ€λ₯Ό μ—­μž„ν•˜κ²Œ λ˜μ—ˆλ‹€. νƒ€κ΅μ™€μ˜ 쑰인트 μ— ν‹°λ₯Ό κΈ°νšν•˜λ €λŠ” 당신은 κ·Όμ²˜μ— μžˆλŠ” 학ꡐ 쀑 μ–΄λŠ 학ꡐ가 μˆ μ„ κ°€μž₯ 많이 λ¨ΉλŠ”μ§€

www.acmicpc.net

 

1. 문제

 

 

 

2. μ •λ‹΅

top_consume_amount = int(0)
top_consume_university = ""

t = int(input())
for a in range(t):
  n = int(input())

  for b in range(n):
    university, consume = input().split(' ')

    if(int(consume) > int(top_consume_amount)):
      top_consume_university, top_consume_amount = university, consume

  print(top_consume_university)