[LeetCode] 1962. Remove Stones to Minimize the Total (Python)
·
알고리즘/LeetCode
난이도: Medium 문제 설명You are given a 0-indexed integer array piles, where piles[i] represents the number of stones in the ith pile, and an integer k. You should apply the following operation exactly k times: Choose any piles[i] and remove floor(piles[i] / 2) stones from it.Notice that you can apply the operation on the same pile more than once. Return the minimum possible total number of stones rema..