adventofcode-2020/01/part1

12 lines
360 B
Plaintext
Raw Normal View History

2020-12-12 12:58:51 +01:00
#!/usr/bin/python3
expenses = []
with open("input") as fh:
for ln in fh:
expenses.append(int(ln))
for i in range(len(expenses)):
for j in range(i + 1, len(expenses)):
if expenses[i] + expenses[j] == 2020:
print(expenses[i], expenses[j], "sum = ", expenses[i] +
expenses[j], "mul = ", expenses[i] * expenses[j])