Skip to content

Commit 405e74b

Browse files
committed
chore: change variable declaration
1 parent 0655338 commit 405e74b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_2025/solutions/day05.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ def part2(self, data: str) -> int:
118118
ranges, _ = self.parse_data(data)
119119
ranges = sorted(ranges, key=lambda interval: interval[0])
120120

121-
total = 0
121+
count = 0
122122
current_start, current_end = ranges[0]
123123

124124
for start, end in ranges[1:]:
125125
if start <= current_end + 1:
126126
current_end = max(current_end, end)
127127
else:
128-
total += current_end - current_start + 1
128+
count += current_end - current_start + 1
129129
current_start, current_end = start, end
130130

131-
total += current_end - current_start + 1
132-
return total
131+
count += current_end - current_start + 1
132+
return count

0 commit comments

Comments
 (0)