set up day 8

This commit is contained in:
Heiko Ludwig 2024-12-08 15:40:05 +01:00
parent 6ac1888062
commit 5298f41aef
3 changed files with 78 additions and 0 deletions

50
day_08/input.txt Normal file
View file

@ -0,0 +1,50 @@
.....................................O..V.........
..................................................
................................O.........Z.......
....W....................................V....v...
........................m................8........
.....................................n........Z..v
.............F.....3...n....5m....................
................................................V.
................3............iv....Z.............V
...........................O..n..i........p......H
......W..6..............................i.........
......................................b...........
..................................n........p......
........M.......c...........m..5......1...........
...M............................L..5..A...........
...w...........9.............F5..................q
.W.....................................q....p.....
.......W........r.......H.....LA......q...........
................4.F....................A..........
........3.......a.....F...................A..L....
....ME...............................Q..........q.
.E..................ih...................Z........
................E...H...........h.................
.........m.........X..............................
..................0......C.................h......
.M......l.................Q.h.....................
..........C..............0........................
.............lX............3.c....................
......8.X.........c....r..a......H.....9..........
.................QE.....C.........................
..R................a........Q...................7.
...........................a......................
l..........X.R............1..I..........9.........
.................0R..............b.....z......x...
.......l.....w....r..........................b....
.8..........0...................P1z...............
.............c.........................L..........
.................C..N............o............9...
...........e..f..N................................
8.............................B...................
...........4...............................x......
....w....RY..........4.......................P....
.........yw.....Y.............o2...............7..
..6y........4..............fo..............7......
.........Y..6............o......................x.
.....Y....e.....y..I.r...........2................
....e.............................P.......z.bB....
.............6.................B........7......x..
..y.N........f...........1....I....z....B.........
.....e....f.............I.................2.......

16
day_08/program.py Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env python3
# https://adventofcode.com/2024/day/8
def get_lines(filename: str) -> list:
with open(filename, "r") as file:
return [line.strip() for line in file.readlines()]
def main():
lines = get_lines("sample-input.txt")
# lines = get_lines("input.txt")
if __name__ == '__main__':
main()

12
day_08/sample-input.txt Normal file
View file

@ -0,0 +1,12 @@
............
........0...
.....0......
.......0....
....0.......
......A.....
............
............
........A...
.........A..
............
............