summaryrefslogtreecommitdiffstats
path: root/19/py/main.py
blob: 2a27287453b5b2857a1080f1de7547e014892a0a (plain) (blame)
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
import time

import d01
import d02
import d03
import d04
import d05
import d06
import d07
import d08
import d09
import d10
import d11
import d12
import d13
import d14
import d15
import d16
import d17
import d18
import d19
import d20
import d21

mods = [d01, d02, d03, d04, d05, d06, d07, d08, d09, d10, \
        d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, \
        d21]

skip = [19]

for mod, day in zip(mods, range(len(mods))):
    if day+1 == 18:
        print("input changed between part 1 and part 2 for day 18, run it separately")
        continue
    elif day+1 in skip:
        continue
    print("Day", str(day+1).zfill(2))
    print("Part", 1, mod.pt1(open("../input/" + str(day+1).zfill(2), "r").readlines()))
    print("Part", 2, mod.pt2(open("../input/" + str(day+1).zfill(2), "r").readlines()))