added day 01
This commit is contained in:
13
01/solve02.py
Normal file
13
01/solve02.py
Normal 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;
|
||||
Reference in New Issue
Block a user