day 8 minor day 9 setup

This commit is contained in:
2019-11-14 08:40:39 -06:00
parent bacdb406c1
commit 90f5ccf6c8
3 changed files with 2 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ class Node(object):
def run(self):
curadd = 0
for i in range(self.childnum):
for _ in range(self.childnum):
self.children.append(
Node(self.input, self.root + 2 + curadd)
)
@@ -36,7 +36,7 @@ class Node(object):
def __repr__(self):
return f'Node at index {self.root}'
# Part 2
# Part 2 Solution Function
def getValue(self):
if self.childnum == 0:
return sum(self.entries)

0
2018/day-9/input Normal file
View File

View File