Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Restricted Sum by _ukasz_Mas_owski
def checkio(data):
def addition(length, tab, increment, result):
#result = result + tab[increment]
if length == 0:
return result
else:
result = result + tab[increment]
result = addition(length-1, tab, increment+1, result)
return result
dlugosc = len(data)
wynik = addition(dlugosc, data, 0, 0)
return wynik
Jan. 20, 2017