aoc2020/1/1.py

12 lines
217 B
Python
Raw Normal View History

2020-12-09 09:26:04 +01:00
import sys
ns = []
with open("input") as f:
for n in f:
n=int(n)
m = list(filter(lambda x: n + x == 2020, ns))
if m:
print(m[0]*n)
sys.exit(0)
ns.append(n)