Skip to content

Commit

Permalink
[2019/9] p2 solved
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlitGhost committed Dec 26, 2023
1 parent f85b674 commit 6bbe639
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions 2019/9/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@


def main():
inputs = [2, 1]
output = []
cpu = IntCode(aoc.read(), input=[1].pop, output=output.append)
cpu = IntCode(aoc.read(), input=inputs.pop, output=output.append)

cpu.process()
print('p1:', output)
output.clear()

cpu.reset()
cpu.process()
print(output)
print('p2:', output)


if __name__ == "__main__":
Expand Down

0 comments on commit 6bbe639

Please sign in to comment.