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