[프로그래머스] - 블록게임 (파이썬)
# 블록게임 import copy dx = [[0, 0, 0, 1, 1, 1], [0, 0, 1, 1, 2, 2]] dy = [[0, 1, 2, 0, 1, 2], [0, 1, 0, 1, 0, 1]] answer = 0 def solution(board): N = len(board) global answer while True: if not drop_block(board): break return answer def drop_block(arr): N = len(arr) for j in range(N): for i in range(N): if arr[i][j] == -1: continue if arr[i][j] != 0: break arr[i][j] = -1 return check(arr) def check..
2022. 2. 15.