From 30622df89d4e297dcfdec8b87964e765e74b80f3 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Tue, 12 Dec 2023 14:00:19 +0100 Subject: [PATCH] Starting 2023-12-12 p1 --- 2023/day12/part1.py | 17 +++++++++++++++++ 2023/day12/test | 6 ++++++ 2 files changed, 23 insertions(+) create mode 100644 2023/day12/part1.py create mode 100644 2023/day12/test diff --git a/2023/day12/part1.py b/2023/day12/part1.py new file mode 100644 index 0000000..5c25c8f --- /dev/null +++ b/2023/day12/part1.py @@ -0,0 +1,17 @@ +import sys +import os +from pprint import pprint +import time +import math + +#colors +from termcolor import colored + +grid = [] + +with open(sys.argv[1]) as file: + for line in file: + grid.append(line.rstrip().split()) + +pprint(grid) + diff --git a/2023/day12/test b/2023/day12/test new file mode 100644 index 0000000..e925935 --- /dev/null +++ b/2023/day12/test @@ -0,0 +1,6 @@ +???.### 1,1,3 +.??..??...?##. 1,1,3 +?#?#?#?#?#?#?#? 1,3,1,6 +????.#...#... 4,1,1 +????.######..#####. 1,6,5 +?###???????? 3,2,1