Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Saw the Stick solution in Clear category for Saw the Stick by PythOff
def checkio(numberOrg):
tab = [1]
i = 1
while sum(tab) != numberOrg:
if tab == []:
break
if sum(tab) > numberOrg:
tab = tab[1:]
else:
i += 1
tab = tab + [tab[-1]+ i]
return tab
Nov. 18, 2016