본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 16175번 General Election

by 현장 2022. 11. 4.

-Code

for _ in range(int(input())):
    n, m = map(int, input().split())
    vote = [0] * n
    for _ in range(m):
        rangeCnt = list(map(int, input().split()))
        for i in range(n):
            vote[i] += rangeCnt[i]
    print(vote.index(max(vote)) + 1)