Day 1 (part 2 renaming)
This commit is contained in:
@@ -7,8 +7,8 @@ tree = dict()
|
||||
|
||||
def tree_up(idx, step=1, offset = 0):
|
||||
print(idx, step)
|
||||
next = tree[(idx, step)] if (idx, step) in tree else None
|
||||
appendix = [] if next is None else tree_up(next+idx, step=step+1, offset=idx)
|
||||
nxt = tree[(idx, step)] if (idx, step) in tree else None
|
||||
appendix = [] if nxt is None else tree_up(nxt+idx, step=step+1, offset=idx)
|
||||
return [idx - offset] + appendix
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ for item in items:
|
||||
sum(vals),
|
||||
math.prod(vals)
|
||||
))
|
||||
exit(0)
|
||||
exit()
|
||||
elif new[0] < 0 or new[1] < 0:
|
||||
# target value too low or to many sums
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user