Advent-of-Code/2020/day 1/P2/report_repair.py

9 lines
312 B
Python
Raw Permalink Normal View History

2020-12-01 08:35:52 +01:00
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)