| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 76919 | 胡海峰老师 | 扫雷游戏 | Python3 | Output Limit Exceeded | 40 MS | 4016 KB | 709 | 2024-06-05 20:11:30 |
m,n = map(int,input().split()) a = [] for x in range(m): a.append(input()) for row in a: print(*row) ###############processing############### b =[ ['*']* n for x in range(m) ] # for row in b: # print(*row) eightpos =[(-1,-1),(-1,0),(-1,1), (0,-1) , (0,1), (1,-1),(1,0),(1,1), ] for x in range(m): for y in range(n): if a[x][y]=='?': mines = 0 for dx,dy in eightpos: nx,ny = x+dx,y+dy if 0<=nx<m and 0<=ny<n and a[nx][ny]=='*': mines +=1 b[x][y] = str(mines) for row in b: print("".join(row))