diff --git a/day9/day9.py b/day9/day9.py index 60a94f1..a0e1141 100644 --- a/day9/day9.py +++ b/day9/day9.py @@ -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