I finally fixed the run line.

This commit is contained in:
Ada Werefox 2025-12-08 18:29:46 -08:00
parent 0db22655f9
commit 232d23c074
8 changed files with 12 additions and 10 deletions

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv
@ -65,7 +65,7 @@ def remove_accessible_paper_rolls(
def main() -> None: def main() -> None:
input_filepath = "input/test_grid.txt" input_filepath = "input/grid.txt"
input_grid = parse_input(input_filepath) input_grid = parse_input(input_filepath)
paper_rolls = get_accessible_paper_rolls(input_grid) paper_rolls = get_accessible_paper_rolls(input_grid)
count = len([x[2] for x in paper_rolls]) count = len([x[2] for x in paper_rolls])

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv

View file

@ -1,4 +1,4 @@
#!/bin/python #!/usr/bin/env python3
from logging import debug, DEBUG, basicConfig from logging import debug, DEBUG, basicConfig
from sys import argv from sys import argv
@ -84,7 +84,9 @@ def main() -> None:
debug(f"DISTANCES BETWEEN BOXES: {distances}") debug(f"DISTANCES BETWEEN BOXES: {distances}")
circuits_after_n, final_distance = create_circuits(distances, len(junction_boxes)) circuits_after_n, final_distance = create_circuits(distances, len(junction_boxes))
debug(f"CIRCUITS CREATED AFTER 1000 ITERATIONS: {circuits_after_n}") debug(f"CIRCUITS CREATED AFTER 1000 ITERATIONS: {circuits_after_n}")
debug(f"FINAL DISTANCE EXAMINED: {final_distance[0]} | {junction_boxes[final_distance[1]]} | {junction_boxes[final_distance[2]]}") debug(
f"FINAL DISTANCE EXAMINED: {final_distance[0]} | {junction_boxes[final_distance[1]]} | {junction_boxes[final_distance[2]]}"
)
circuits_after_n.sort(reverse=True) circuits_after_n.sort(reverse=True)
product_of_n_largest_circuits = ( product_of_n_largest_circuits = (
circuits_after_n[0] * circuits_after_n[1] * circuits_after_n[2] circuits_after_n[0] * circuits_after_n[1] * circuits_after_n[2]