summaryrefslogtreecommitdiffstats
path: root/solutions/py/d16.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-16 20:49:09 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-16 20:50:09 +0100
commit58b64b16fcc0004eb8661d45ff3fbeef285d668a (patch)
tree463796e79243b8dc9e49b9e03374f7bce244d9f7 /solutions/py/d16.py
parentb16f71eefe243089c69c9b9af956c66761fee170 (diff)
downloadaoc-58b64b16fcc0004eb8661d45ff3fbeef285d668a.tar.gz
Day 16 call from main
Runtime is ~12 seconds per part
Diffstat (limited to 'solutions/py/d16.py')
-rw-r--r--solutions/py/d16.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/solutions/py/d16.py b/solutions/py/d16.py
index 01bb25e..d08c856 100644
--- a/solutions/py/d16.py
+++ b/solutions/py/d16.py
@@ -1,7 +1,3 @@
-from profilehooks import coverage
-from profilehooks import profile
-
-#@coverage
def do(input, phases=100, repeats=1):
nums = []
for i in range(repeats):
@@ -59,13 +55,12 @@ def square(size):
s += "\n"
return s
-input = open("../input/16", "r").readlines()
-ans1 = pt1(input)
-ans2 = pt2(input)
-print(ans1)
-print(ans2)
-#print(do(["80871224585914546619083218645595"]))
-#print()
-#print(square(8))
-#print(square(20))
-#print(square(62))
+if __name__ == "__main__":
+ input = open("../input/16", "r").readlines()
+ ans1 = pt1(input)
+ ans2 = pt2(input)
+ print(ans1)
+ print(ans2)
+ #print(square(8))
+ #print(square(20))
+ #print(square(62))