자주나오는 유형. 규칙에따라 블록 부수고 중력작용. def bomb_block(b, m, n): block = set() for i in range(m - 1): for j in range(n - 1): if b[i][j] and b[i][j] == b[i][j + 1] == b[i + 1][j] == b[i + 1][j + 1]: for dx, dy in [(0, 0), (1, 0), (0, 1), (1, 1)]: nx, ny = i + dx, j + dy block.add((nx, ny)) if not block: return 0, 0 for x, y in block: b[x][y] = 0 new_board = [[0] * n for _ in range(m)] for j in range(n): idx..