Advent-of-Code/2020/day 1/P2/report_repair.py
2020-12-01 08:37:14 +01:00

8 lines
312 B
Python

expense_report = [int(i) for i in open("input.txt").read().split("\n")[:-1]]
for i in expense_report:
for j in filter(lambda x: x!= i, expense_report):
for k in filter(lambda x: x not in [i, j], expense_report):
if i + j + k == 2020:
print(i*j*k)
exit(0)