본문 바로가기
Algorithm./BackJoon

백준 python : 2566 최댓값

by dev챙 2024. 1. 11.

for 문으로 9개만큼 input을 받기

table = [list(map(int, input().split())) for _ in range(9)]

max_num = 0
max_row, max_col = 0, 0
for row in range(9):
    for col in range(9):
        if max_num <= table[row][col]:
            max_row = row + 1
            max_col = col + 1
            max_num = table[row][col]

print(max_num)
print(max_row, max_col)