mirror of
https://github.com/Xevion/advent-of-code.git
synced 2025-12-06 17:14:20 -06:00
day 8 minor day 9 setup
This commit is contained in:
@@ -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
0
2018/day-9/input
Normal file
0
2018/day-9/python/main.py
Normal file
0
2018/day-9/python/main.py
Normal file
Reference in New Issue
Block a user