-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.py
More file actions
64 lines (57 loc) · 1.21 KB
/
Copy pathtemplate.py
File metadata and controls
64 lines (57 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from aocd.examples import Example
from aocd.models import Puzzle
from termcolor import colored
from utils import ( # noqa
flatten,
ints,
lmap,
lmapsub,
pgriddict,
pgridint,
pgrp,
pgrpint,
pgrpints,
pint,
plint,
preg,
pstrip,
)
def parse(input):
return []
def part_a(data):
return 0
def part_b(data):
return 0
puzzle = Puzzle(2025, 1)
for i, x in enumerate(puzzle.examples):
example: Example = x
print("========================================")
print(f"Example {i+1}\n")
print(example.input_data, "\n")
parsed = parse(example.input_data)
a = part_a(parsed)
print(
"a",
example.answer_a,
a,
colored("CORRECT", "green")
if example.answer_a == str(a)
else colored("INCORRECT", "red"),
)
b = part_b(parsed)
print(
"b",
example.answer_b,
b,
colored("CORRECT", "green")
if example.answer_b == str(b)
else colored("INCORRECT", "red"),
)
print("========================================")
data = parse(puzzle.input_data)
a = part_a(data)
print("part A", a)
# puzzle.answer_a = a
b = part_b(data)
print("part B", b)
# puzzle.answer_b = b