Minor cleanup 2019 d8
This commit is contained in:
parent
af4507f785
commit
ef8a247ad6
@ -1,4 +1,4 @@
|
|||||||
from lib import get_data, str_to_ints
|
from lib import get_data
|
||||||
|
|
||||||
|
|
||||||
def part_1(data):
|
def part_1(data):
|
||||||
@ -20,6 +20,7 @@ def part_1(data):
|
|||||||
if zeros < min_zeros:
|
if zeros < min_zeros:
|
||||||
min_zeros = zeros
|
min_zeros = zeros
|
||||||
min_zero_layer = layer
|
min_zero_layer = layer
|
||||||
|
assert min_zero_layer is not None
|
||||||
ones = min_zero_layer.count(1)
|
ones = min_zero_layer.count(1)
|
||||||
twos = min_zero_layer.count(2)
|
twos = min_zero_layer.count(2)
|
||||||
print(ones * twos)
|
print(ones * twos)
|
||||||
|
Loading…
Reference in New Issue
Block a user