Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109666 | 展博 | 外围元素之和 | Python3 | Accepted | 39 MS | 3792 KB | 310 | 2025-02-10 13:24:37 |
rows,cols=input().split() rows,cols=int(rows),int(cols) a=[] for x in range(rows): b=input().split() for x in range(len(b)): b[x]=int(b[x]) a.append(b) res=0 for x in range(rows): for y in range(cols): if x==0 or y==0 or x==rows-1 or y==cols-1: res+=a[x][y] print(res)