My Advent of Code solutions in Python. kevinyap.ca/2019/12/going-fast-in-advent-of-code/
advent-of-code python
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update day25.py

+1 -3
+1 -3
2019/day25.py
··· 1 1 import sys 2 2 import fileinput 3 - from collections import deque 4 3 from itertools import combinations 5 4 6 5 from intcode import emulate ··· 52 51 53 52 TAPE = [int(x) for x in fileinput.input()[0].split(',')] 54 53 TAPE += [0] * 10000 55 - inputs = deque(reversed([ord(c) for c in TAS])) 56 54 57 - vm = emulate(TAPE, inputs) 55 + vm = emulate(TAPE, [ord(c) for c in TAS][::-1]) 58 56 try: 59 57 while True: 60 58 resp = chr(next(vm))