AdventOfCode/2019/day9.py
Adrien Abraham 037abe5c4a Day 9 (WIP)
2019-12-09 18:34:16 +01:00

18 lines
406 B
Python

from intcode import Intcode
EX1 = "109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99"
EX2 = "1102,34915192,34915192,7,4,7,99,0"
EX3 = "104,1125899906842624,99"
def main():
with open("day9.txt", "rt") as input_file:
text = input_file.readlines()[0].rstrip()
codes = Intcode.parse_input(text)
Intcode(codes, print_output=True).run([1])
if __name__ == "__main__":
main()