解题思路:
注意事项:
参考代码:
n,m = map(int,input().split())
l = []
for i in range(n):
s = list(map(int,input().split()))
l.append(s)
t = [row[:] for row in l]
for i in range(1,n-1):
for j in range(1,m-1):
t[i][j] =round((l[i-1][j] + l[i+1][j] + l[i][j-1] + l[i][j+1] + l[i][j])/5)
for i in t:
print(*i)
0.0分
0 人评分