1
0
Fork 0
advent-of-code/2015/aoc_d2p2.py

13 lines
260 B
Python

#!/usr/bin/env python
total = 0
with open("inputd2.txt", "r") as f:
for line in f:
dimensions = sorted([int(x) for x in line.split("x")])
l = dimensions[0]
w = dimensions[1]
h = dimensions[2]
total += (2 * l) + (2 * w) + (l * w * h)
print(total)