From a7a6b86002b595bc167af72606b14c67ed1bdf8f Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 24 Nov 2021 22:25:42 +0000 Subject: init commit --- 2/2.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 2/2.py (limited to '2/2.py') diff --git a/2/2.py b/2/2.py new file mode 100644 index 0000000..808c999 --- /dev/null +++ b/2/2.py @@ -0,0 +1,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')))) -- cgit v1.2.3-54-g00ecf