diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-11-24 22:25:42 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-11-24 22:25:42 +0000 |
commit | a7a6b86002b595bc167af72606b14c67ed1bdf8f (patch) | |
tree | bff94329cf969bd9df68d3b9782fee2107db56c2 /2/1.py | |
download | aoc2015-a7a6b86002b595bc167af72606b14c67ed1bdf8f.tar.gz aoc2015-a7a6b86002b595bc167af72606b14c67ed1bdf8f.tar.xz aoc2015-a7a6b86002b595bc167af72606b14c67ed1bdf8f.zip |
init commit
Diffstat (limited to '2/1.py')
-rw-r--r-- | 2/1.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -0,0 +1,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')))) |