rename n.py -> 0n.py

This commit is contained in:
PedroEdiaz
2025-10-29 23:23:02 -06:00
parent 62dade14e1
commit 4932f78954
6 changed files with 37 additions and 36 deletions

26
2015/02.py Normal file
View File

@@ -0,0 +1,26 @@
# Fill Input
input = ""
try:
with open("02.txt", 'r', encoding='utf-8') as file:
input += file.read()
except Exception as e:
print(f"An error occurred: {e}")
# Result
res1, res2 = 0, 0;
for line in input.split('\n'):
if line == "":
break
box = [int(n) for n in line.split('x')]
box.sort()
l,w,h= box
res1+=3*l*w+2*(w*h+l*h)
res2+=2*(l+w)+l*w*h
print(res1, res2)