From 5298f41aefb64607c7af22cd19fabaf186cfcbb7 Mon Sep 17 00:00:00 2001 From: Heiko Ludwig Date: Sun, 8 Dec 2024 15:40:05 +0100 Subject: [PATCH] set up day 8 --- day_08/input.txt | 50 +++++++++++++++++++++++++++++++++++++++++ day_08/program.py | 16 +++++++++++++ day_08/sample-input.txt | 12 ++++++++++ 3 files changed, 78 insertions(+) create mode 100644 day_08/input.txt create mode 100755 day_08/program.py create mode 100644 day_08/sample-input.txt diff --git a/day_08/input.txt b/day_08/input.txt new file mode 100644 index 0000000..07030f2 --- /dev/null +++ b/day_08/input.txt @@ -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....... diff --git a/day_08/program.py b/day_08/program.py new file mode 100755 index 0000000..47ec568 --- /dev/null +++ b/day_08/program.py @@ -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() diff --git a/day_08/sample-input.txt b/day_08/sample-input.txt new file mode 100644 index 0000000..78a1e91 --- /dev/null +++ b/day_08/sample-input.txt @@ -0,0 +1,12 @@ +............ +........0... +.....0...... +.......0.... +....0....... +......A..... +............ +............ +........A... +.........A.. +............ +............