Ho, dubbele cast

This commit is contained in:
2020-12-10 22:27:27 +01:00
parent 7dc7cf667c
commit bffb90e7f2

View File

@@ -38,11 +38,8 @@ def part2():
for size in range(2, len(lines)):
for finger in range(0, len(lines) - size):
subset = lines[finger:(finger + size)]
subset = [int(i) for i in subset]
if sum(subset) == number:
ans = min(subset) + max(subset)
print("Part 2: %d" % ans)
print("Part 2: %d" % (min(subset) + max(subset)))
return