added day 01

This commit is contained in:
Peter Hudec
2021-12-13 07:59:07 +01:00
parent db31e667a6
commit da5530cdef
4 changed files with 232 additions and 0 deletions

13
01/solve02.py Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env python
from itertools import permutations
report = []
with open("input01.txt","r") as f:
report = [int(i) for i in f.readlines()]
for p in permutations(report, 3):
if sum(p) == 2020:
print(p[0]*p[1]*p[2])
break;