summaryrefslogtreecommitdiffstats
path: root/2/2.py
blob: 808c999fdd141d9e48447fa69d5f0ae40cc5601d (plain)
1
2
3
4
from itertools import combinations
from functools import reduce
from operator import mul
print(sum(2 * (sum(box) - max(box)) + reduce(mul, box) for box in ([int(x) for x in l.split('x')] for l in open('input'))))