[프로그래머스][Python] 크레인 인형뽑기 게임
def solution(board,moves):
count=0
bucket=[]
for move in moves:
for i in range(len(board)):
if board[i][move-1] >0:
bucket.append(board[i][move-1])
board[i][move-1]=0
if bucket[-1:]==bucket[-2:-1]:
bucket = bucket[:-2]
count+=2
break
return count