Day 1 (glamorized)
This commit is contained in:
@@ -22,11 +22,7 @@ for item in items:
|
||||
new = (elem[0] - item, elem[1]-1)
|
||||
if new == (0, 0):
|
||||
vals = tree_up(item)
|
||||
print("Found [{}]: Sum={}, Product={}".format(
|
||||
", ".join(map(str, vals)),
|
||||
sum(vals),
|
||||
prod(vals)
|
||||
))
|
||||
print(prod(vals))
|
||||
elif new[0] > 0 and new[1] > 0:
|
||||
if new not in tree:
|
||||
tree[new] = item
|
||||
|
||||
Reference in New Issue
Block a user