Submission #31148966
Source Code Expand
h,w = list(map(int,input().split()))
a = [list(map(int, input().split())) for _ in range(h)]
row_sum = [sum(row) for row in a]
col_sum = [sum(e[i] for e in a) for i in range(w)]
result = [[row_sum[i] + col_sum[j] - a[i][j] for j in range(w)] for i in range(h)]
for row in result:
print(*row)
Submission Info
| Submission Time | |
|---|---|
| Task | 004 - Cross Sum(★2) |
| User | inaty |
| Language | Python (3.8.2) |
| Score | 2 |
| Code Size | 307 Byte |
| Status | AC |
| Exec Time | 2380 ms |
| Memory | 225864 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 2 / 2 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
| All | hand01.txt, hand02.txt, hand03.txt, hand04.txt, random01.txt, random02.txt, random03.txt, random04.txt, random05.txt, random06.txt, random07.txt, random08.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| hand01.txt | AC | 24 ms | 8856 KiB |
| hand02.txt | AC | 29 ms | 9440 KiB |
| hand03.txt | AC | 23 ms | 9124 KiB |
| hand04.txt | AC | 2380 ms | 225864 KiB |
| random01.txt | AC | 221 ms | 25488 KiB |
| random02.txt | AC | 818 ms | 79632 KiB |
| random03.txt | AC | 504 ms | 50544 KiB |
| random04.txt | AC | 683 ms | 64628 KiB |
| random05.txt | AC | 28 ms | 9360 KiB |
| random06.txt | AC | 166 ms | 20888 KiB |
| random07.txt | AC | 2030 ms | 197260 KiB |
| random08.txt | AC | 458 ms | 45688 KiB |
| sample_01.txt | AC | 17 ms | 8864 KiB |
| sample_02.txt | AC | 18 ms | 8936 KiB |
| sample_03.txt | AC | 22 ms | 8840 KiB |
| sample_04.txt | AC | 18 ms | 8924 KiB |