힙(Heap) 더 맵게정확성 -- 4개 틀림 테케1 테케3 테케8 테케14import heapqdef solution(scoville, K): # answer = 섞어야 하는 최소 횟수 answer = 0 # scoville 을 힙으로 만들기 heapq.heapify(scoville) # 가장 작은 수가 K 이상이 될 때까지 반복하기 while True: if scoville[0] >= K: return answer # 1단계:제일 작은 수 제거 least = heapq.heappop(scoville) # 2단계:두번째로 작은 수 제거 less = heapq.heappop(scoville) ..