You are viewing a single comment's thread. Return to all comments →
def chocolateFeast(n, c, m): ch=n//c wr=ch while(wr>=m): ch+=wr//m wr=wr//m+wr%m return ch
try this out with time comlexity less than O(n) :)
Seems like cookies are disabled on this browser, please enable them to open this website
Chocolate Feast
You are viewing a single comment's thread. Return to all comments →
try this out with time comlexity less than O(n) :)