You are viewing a single comment's thread. Return to all comments →
def getMinimumCost(k, c): c.sort(reverse=True) total = 0 multi = 1 for i, f in enumerate(c): if i % k == 0 and i > 0: multi += 1 total += multi * f return total
Seems like cookies are disabled on this browser, please enable them to open this website
Greedy Florist
You are viewing a single comment's thread. Return to all comments →