-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolver.py
47 lines (37 loc) · 785 Bytes
/
solver.py
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
#!/usr/bin/env python3
from pathlib import Path
currdir = Path(__file__).parent.absolute()
# paste the example from the problem here ↓
test_input = """
#############
#...........#
###B#C#B#D###
#A#D#C#A#
#########
""".strip()
def part1():
# I made it by hand :p
solution = sum(
[
2000,
3,
3000,
6,
5000,
20,
600,
30,
600,
50,
3,
8,
]
)
return solution
def main():
raw_input = open(currdir.joinpath("input.txt")).read()
raw_input = test_input # testing with the example - comment for real input
print("Solution to Part 1:")
print(part1())
if __name__ == "__main__":
main()