Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Restricted Sum by Wojtas1411
def checkio(tab):
if len(tab)==0:
return 0
elif len(tab)==1:
return tab[0]
else:
x=len(tab)
tab[x-2]=tab[x-1]+tab[x-2]
tab.pop()
return checkio(tab)
Oct. 23, 2016