ํฌ๋ ์ธ ์ธํ๋ฝ๊ธฐ ๊ฒ์ (1) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ [ํ๋ก๊ทธ๋๋จธ์ค] ํฌ๋ ์ธ ์ธํ๋ฝ๊ธฐ ๊ฒ์ ๋ด ์ฝ๋ def solution(board, moves): answer = 0 q = [] l=0 while True: if (len(moves)-1) == l: break for i in board: if (i[moves[l]-1]) !=0: q.append(i[moves[l]-1]) i[moves[l]-1] = 0 break l+=1 while True: if len(q)>=2 and (q[len(q)-2] == q[len(q)-1]): answer+=2 q.pop() q.pop() else: break return answer ์นด์นด์ค ๋ฌธ์ !!! ์นด์นด์ค ๋ฌธ์ ๋ค์ ๊ท์ฝ๋ค..,, ๋ฌธ์ ์ ์นด์นด์ค ์บ๋ฆญํฐ๋ค์ด ๋์จ๋ค...,,ใ ใ ๋ฌธ์ ํธ๋๋ฐ๋ ๋ณ๋ก ์๊ฐ์ด ์๊ฑธ๋ ธ๋๋ฐ.. ๋ฉ๋๋ฆฌ๋ฉด์ ํ๋ค๊ฐ len(q)๋ฅผ len์ผ.. ์ด์ 1 ๋ค์