ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [코드트리 챌린지] 1주차 09.13 edited.
    카테고리 없음 2023. 9. 13. 10:37

    [09.13 2차 실력진단]

     

     

    [문제 학습] 

     

    이차원 격자 11


    n, k = map(int, input().split())
    grid = []
    for _ in range(n):
        row = list(map(int, input().split()))
        grid.append(row)
    r1, c1 = map(int, input().split())
    r2, c2 = map(int, input().split())
    
    count = 0
    
    for i in range(r1 - 1, r2):
        for j in range(c1 - 1, c2):
            if grid[i][j] >= k:
                count += 1
    
    print(count)

    댓글

Designed by Tistory.