summaryrefslogtreecommitdiffstats
path: root/2/1.py
blob: 028dd04d2d41f000578aa66ff7334f2b4cd7adbe (plain)
1
2
3
from itertools import combinations
from functools import reduce
print(sum(min(box) + 2 * sum(box) for box in ([int(a) * int(b) for a, b in combinations(l.split('x'), 2)] for l in open('input'))))