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

[백준/파이썬] 26392번 Desni klik

by 현장 2024. 7. 4.

-Code

n, r, s = map(int, input().split())

for _ in range(n):
    max_val, min_val = 0, 1e9
    for i in range(r):
        line = input()

        if "#" in line:
            val = r - i
            max_val = max(max_val, val)
            min_val = min(max_val, val)

    print(max_val - min_val)