-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
70 lines (57 loc) · 2.23 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import day01
import day02
import day03
import day04
import day05
from y2020_d02 import Y2020D02
if __name__ == '__main__':
today = '2020'
input_file = f'problem_inputs/aoc_2020_02_input.txt'
with open(input_file) as day_fp:
day_input = day_fp.readlines()
day_input = [f'{i}'.strip() for i in day_input]
aoc2020d2 = Y2020D02(day_input)
aoc2020d2.day01()
aoc2020d2.day02()
if today == '05' or today == '06':
# input_file = f'problem_inputs/day{today}_input.txt'
input_file = f'problem_inputs/test_input.txt'
with open(input_file) as day_fp:
day_input = day_fp.readlines()
day_input = [f'{i}'.strip() for i in day_input]
if today == '05':
day05.part01(day_input)
day05.part02(day_input)
if today == '06':
day05.part01(day_input)
day05.part02(day_input)
if today == '04':
input_file = f'problem_inputs/day{today}_input.txt'
# input_file = f'problem_inputs/test_input.txt'
with open(input_file) as day_fp:
day_input = day_fp.readlines()
day_input = [f'{i}'.strip() for i in day_input]
day04.part01(day_input)
day04.part02(day_input)
if today == '03':
input_file = f'problem_inputs/day{today}_input.txt'
# input_file = f'problem_inputs/day{today}_test.txt'
with open(input_file) as day_fp:
day_input = day_fp.readlines()
day_input = [f'{i}'.strip() for i in day_input]
day03.part01(day_input)
day03.part02(day_input)
if today == '02':
input_file = f'problem_inputs/day{today}_input.txt'
with open(input_file) as day_fp:
day_input = day_fp.readlines()
day_input = [f'{i}'.strip() for i in day_input]
day02.part01(day_input)
day02.part02(day_input)
if today == '01':
day01_input_file = 'problem_inputs/day01_input.txt'
with open(day01_input_file) as day01fp:
day01_input = day01fp.readlines()
day01_input = [f'{i}'.strip() for i in day01_input]
day01.part01(day01_input)
day01.part02(day01_input)