aoc/2023/10/10.incomplete.py

17 lines
259 B
Python
Raw Permalink Normal View History

2024-03-05 09:32:18 +00:00
with open("input.txt") as f:
pipes = f.read().splitlines()
def part1(pipes):
start = [
(i, j)
for i, line in enumerate(pipes)
for j, char in enumerate(line)
if char == "S"
][0]
distance = [([0] * len(pipes[0]))] * len(pipes)
x, y = start
d = 0