qp建议使用c++写
by lihaoda @ 2023-10-22 19:19:41
```python
import copy
n,m=map(int,input().split())
a=[]
for i in range(n):
c=list(map(int,input().split()))
a.append(c)
an=copy.deepcopy(a)
for i in range(1,n-1):
for j in range(1,m-1):
k=(a[i-1][j]+a[i+1][j]+a[i][j-1]+a[i][j+1]+a[i][j])/5
f = 0
if k*10%10 >= 5:
f = 1
if f == 0:
an[i][j] = int(k)
else:
an[i][j] = int(k)+1
for i in range(len(an)):
for j in range(len(an[i])):
print(an[i][j],end=" ")
print()
```
by Botter @ 2023-10-23 15:57:24
re的原因是没有导包
加上这行
```python
import copy
```
然后题目说的是~~最接近的整数~~
by Botter @ 2023-10-23 15:59:43
@[lihaoda](/user/1024914) p党不服并表示为嘛py不好
by leo_____ @ 2023-12-21 19:13:36
@[leo_____](/user/1229564) py在这题可能不太好做,但高精度好做点,也算是各有利弊
by lihaoda @ 2023-12-21 20:00:15
@[lihaoda](/user/1024914) yesyes本人蒟蒻,~~只~~会~~一~~~~点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点~~python
by leo_____ @ 2023-12-22 17:26:30