25 lines
427 B
Python
25 lines
427 B
Python
|
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)
|
||
|
|