You are viewing a single comment's thread. Return to all comments →
def getMinimumCost(k, c): times=len(c)/k c.sort(reverse=True) sum=0 for i in range(len(c)): sum+=c[i]*((i//k)+1) return sum
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 →