You are viewing a single comment's thread. Return to all comments →
def toys(w): currentlist = list(sorted(w)) cnt = 0 while len(currentlist) > 0: maxweight = currentlist[0]+4 currentlist = [x for x in currentlist if x > maxweight] # print(currentlist) cnt += 1 if cnt > 1000000: break return cnt
Seems like cookies are disabled on this browser, please enable them to open this website
Priyanka and Toys
You are viewing a single comment's thread. Return to all comments →