aboutsummaryrefslogtreecommitdiff
path: root/2025/07/b.py
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-12-07 09:14:27 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-12-07 09:14:27 +0100
commiteb233235c876600bafa39a538d18ce11cfc72b39 (patch)
tree38f074d2e158d8109476d39ea6426ce8b60e98b2 /2025/07/b.py
parent61718ca8b469ebad7ed59da0ed3c167046cd8e57 (diff)
downloadaoc-eb233235c876600bafa39a538d18ce11cfc72b39.tar.gz
aoc-eb233235c876600bafa39a538d18ce11cfc72b39.zip
Clean up and alternative solution to day 7
Diffstat (limited to '2025/07/b.py')
-rw-r--r--2025/07/b.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/2025/07/b.py b/2025/07/b.py
index 41c0db0..4457654 100644
--- a/2025/07/b.py
+++ b/2025/07/b.py
@@ -2,8 +2,8 @@ import fileinput
2 2
3with fileinput.input() as lines: 3with fileinput.input() as lines:
4 rows = [line[:-1] for line in lines] 4 rows = [line[:-1] for line in lines]
5 pos = {rows[0].find('S'): 1}
6 5
6pos = {rows[0].find('S'): 1}
7for row in rows[1:]: 7for row in rows[1:]:
8 newpos = {} 8 newpos = {}
9 for p, w in pos.items(): 9 for p, w in pos.items():

Generated with cgit - Back to sebastiano.tronto.net