2022 7b solved

master
kwout 11 months ago
parent 32be41efc8
commit 152016025b
  1. 11
      2022/7.py

@ -22,8 +22,15 @@ for l in lines:
sofar += p sofar += p
sizes[sofar] += int(l[i][0]) sizes[sofar] += int(l[i][0])
min = sizes["/"] + 30000000 - 70000000
smallest = sizes["/"]
for s in sizes: for s in sizes:
if sizes[s] <= 100000: size = sizes[s]
sum += sizes[s] if size <= 100000:
sum += size
if size >= min and size < smallest:
smallest = size
print(sum) print(sum)
print(smallest)
Loading…
Cancel
Save