Submission #19723267


Source Code Expand

Copy
h,w=list(map(int,input().split()))
min_num=float('inf')
sum_num=0
grids=[list(map(int,input().split())) for _ in range(h)]
for i in range(h):
    for j in range(w):
        sum_num+=grids[i][j]
        min_num=min(min_num,grids[i][j])
print(sum_num - (min_num * h * w))

Submission Info

Submission Time
Task B - Blocks on Grid
User tokumaru_y
Language Python (3.8.2)
Score 200
Code Size 277 Byte
Status AC
Exec Time 37 ms
Memory 9108 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 14
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 37 ms 9008 KB
random_02.txt AC 22 ms 9096 KB
random_03.txt AC 25 ms 8872 KB
random_04.txt AC 25 ms 8980 KB
random_05.txt AC 26 ms 8876 KB
random_06.txt AC 18 ms 9104 KB
random_07.txt AC 26 ms 8876 KB
random_08.txt AC 25 ms 9040 KB
random_11.txt AC 31 ms 8956 KB
random_12.txt AC 32 ms 9068 KB
random_13.txt AC 30 ms 9108 KB
sample_01.txt AC 19 ms 9044 KB
sample_02.txt AC 22 ms 9096 KB
sample_03.txt AC 25 ms 9028 KB