You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
316 B
Python
16 lines
316 B
Python
3 years ago
|
with open("input") as f:
|
||
|
puzzle_input = [n.strip() for n in f.readlines()]
|
||
|
|
||
|
paper = 0
|
||
|
|
||
|
for present_dim in puzzle_input:
|
||
|
parsed_dim = [int(x) for x in present_dim.split("x")]
|
||
|
parsed_dim.sort()
|
||
|
print(parsed_dim)
|
||
|
|
||
|
[l, w, h] = parsed_dim
|
||
|
|
||
|
paper += 3 * l * w + 2 * w * h + 2 * h * l
|
||
|
|
||
|
print(paper)
|