def code_for_point(point): tape = Tape.tape_from_challenge(19, input_values=point) tape.run() return StatusCode(tape.output[-1])
def part1(): explorer = Tape.tape_from_challenge(15, Explorer) explorer.explore() path_to_oxygen = explorer.find_path(Point(0, 0), explorer.oxygen) return len(path_to_oxygen)
def part2(): explorer = Tape.tape_from_challenge(15, Explorer) explorer.explore() return max(explorer.distances_from(explorer.oxygen).values()) + 1
def part1(): world: World = Tape.tape_from_challenge(17, World) return sum(p.x * p.y for p in world.scaffold_points())