Day 9 (added print)

This commit is contained in:
Sebastian Seedorf
2020-12-12 15:33:59 +01:00
parent 95e9686451
commit 671787d627

View File

@@ -5,12 +5,11 @@ lines = (int(x.strip()) for x in open("input.txt"))
L = 25
buffer = deque(maxlen=L)
result = None
for line in lines:
if len(buffer) == L:
found = any(a + b == line for a, b in combinations(buffer, 2))
if not found:
result = line
print(line)
break
buffer.append(line)