summaryrefslogtreecommitdiffstats
path: root/20/py/d01.py
diff options
context:
space:
mode:
Diffstat (limited to '20/py/d01.py')
-rw-r--r--20/py/d01.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/20/py/d01.py b/20/py/d01.py
index c8ca64b..932f370 100644
--- a/20/py/d01.py
+++ b/20/py/d01.py
@@ -1,4 +1,8 @@
#!/usr/bin/env python3
+import aoc20
+import sys
+
+
def pt1(_in):
nums = [int(n) for n in _in]
for i, n1 in enumerate(nums):
@@ -19,6 +23,6 @@ def pt2(_in):
if __name__ == "__main__":
- input = open("../input/01", "r").readlines()
+ input = aoc20.read_input(sys.argv[1:], 1)
print(pt1(input))
print(pt2(input))