Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Restricted Sum by yfhub
def checkio(data):
ans = 0
def add(n, data_l):
if (1 > len(data_l)):
return n
return n + add(data_l.pop(0), data_l)
if (0 < len(data)):
ans = add(data.pop(0), data)
return ans
Jan. 17, 2020