You are viewing a single comment's thread. Return to all comments →
import heapq def minSum(num, k): num1 = [-i for i in num] heapq.heapify(num1) m = heapq.heappop(num1) for i in range(k): m = heapq.heappushpop(num1, m//2) return -1*(sum(num1)+m)
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Sum 10
You are viewing a single comment's thread. Return to all comments →