내가 작성한 코드
def solution(board, moves):
answer = 0
stack=[]
maxx=max(moves)
for x in moves:
for i in range(maxx):
if(board[i][x-1]!=0):
stack.append((board[i][x-1])
board[i][x-1]=0
if len(stack)>=2 and stack[-1]==stack[-2]:
answer+=1
stack.pop()
stack.pop()
break
return answer
근데 다음과 같이 오류가 난다.
Traceback (most recent call last):
File "/solution_test.py", line 6, in <module>
from solution import *
File "/solution.py", line 11
board[i][x-1]=0
^
SyntaxError: invalid syntax
테스트 결과 (~˘▾˘)~