advent_of_code/2020/01/result.py

25 lines
427 B
Python
Raw Normal View History

2021-12-01 17:01:33 +01:00
import collections
sum = 2020
eingabe = []
with open('./input.txt') as f:
for line in f:
eingabe.append(int(line))
# print(eingabe)
sumtable = []
for summ1 in eingabe:
suche = 2020 - summ1
sumtable.append(suche)
if suche in eingabe:
print('{} + {} = {}'.format(summ1, suche, int(summ1)+int(suche)))
print('found')
print(eingabe, len(eingabe))
print(sumtable)