Run ID:109662

提交时间:2025-02-10 13:15:12

rows , cols = input().split() rows, cols = int(rows),int(cols) # input() split() ,int() a =[] for x in range( rows): b = input().split() for x in range( len(b)): b[x] = int( b[x]) a.append( b ) # [1,2,3,4,5] #数据输入(处理数据) 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) #数据输出