Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
128416 | 江屹山 | 外围元素之和 | Python3 | Accepted | 57 MS | 3796 KB | 407 | 2025-08-16 14:35:32 |
row, col=input().split() row=int(row) col=int(col) a=[] for x in range(row): b=input().split() a.append(b) res=0 for i in range(row): for j in range(col): if i==0: res+=int(a[i][j]) elif j==0: res += int(a[i][j]) elif i==row-1: res += int(a[i][j]) elif j==col-1: res += int(a[i][j]) print(res)