mirror of
https://github.com/thib8956/advent-of-code.git
synced 2026-11-06 10:02:27 +00:00
make 2020 compatible with run.py
This commit is contained in:
1 parent
f9abb90915
commit
9c76828788
14 files changed
+119
-81
No files matched your search
+8
-2
@@ -43,7 +43,13 @@ def generate_permutation(instructions, line, index):
|
||||
return permutation
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
instructions = [line.rstrip() for line in open("input.txt")]
|
||||
def main(inp):
|
||||
instructions = [line.rstrip() for line in fileinput.input()]
|
||||
print("Part 1 : (ip, acc) ", part1(instructions)[1])
|
||||
print("Part 2 : (ip, acc) ", part2(instructions))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import fileinput
|
||||
main(fileinput.input())
|
||||
|
||||
Reference in new issue
Block a user