想用有限状态机解的,但是算法循环多了,导致超时 row,col = map(int,input().split()) minetb = [[0 for _ in range (col)] for _ in range(row) ] state = 0 x,y=0,0 allstate = [[0,1],[1,0],[1,-1],[-1,1],[-1,0],[0,-1],[-1,-1],[1,1]] for i in range(row): minetb[i] = list(str1 for str1 in input()) for i in range(row): for j ...