Run ID:109668

提交时间:2025-02-10 13:33:10

rows,cols=map( int, input().split()) #地图Noun Verb:映射 a=[] for x in range(rows): b=input().split() b= [ int(t) for t in b] #给列表b中的每个元素取整 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)