|
|
|
@ -32,20 +32,13 @@ for i in range(len(nums)): |
|
|
|
|
invalid, invalidindex = valid[1], i |
|
|
|
|
break |
|
|
|
|
|
|
|
|
|
def sumlist(l): |
|
|
|
|
ssum = 0 |
|
|
|
|
for num in l: |
|
|
|
|
ssum += num |
|
|
|
|
return ssum |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stop = False |
|
|
|
|
foundnums = [] |
|
|
|
|
for i in range(len(nums)): |
|
|
|
|
for rangei in range(len(nums)): |
|
|
|
|
numlist = nums[i-rangei:i] |
|
|
|
|
if( not invalid in numlist ): |
|
|
|
|
sumnums = sumlist(numlist) |
|
|
|
|
sumnums = sum(numlist) |
|
|
|
|
|
|
|
|
|
if(sumnums == invalid): |
|
|
|
|
foundnums = numlist |
|
|
|
|