generated from public/aoc_template
remove temp clutter
This commit is contained in:
parent
dfadef52c5
commit
fdfa8a02b2
13
day05.py
13
day05.py
@ -100,16 +100,3 @@ class Day(AOCDay):
|
||||
if __name__ == "__main__":
|
||||
day = Day(2023, 5)
|
||||
day.run(verbose=True)
|
||||
inst, nodes = self.parse_input()
|
||||
cur_node = [x for x in nodes if x.endswith("A")]
|
||||
cur_step = 0
|
||||
while set(x[2] for x in cur_node) != {"Z"}:
|
||||
new_node = []
|
||||
dir = inst[cur_step % len(inst)]
|
||||
for node in cur_node:
|
||||
if dir == "L":
|
||||
new_node.append(nodes[node][0])
|
||||
else:
|
||||
new_node.append(nodes[node][1])
|
||||
|
||||
cur_step += 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user