diff --git a/src/2021/day01/main2.py b/src/2021/day01/main2.py index 8135f07..8738330 100644 --- a/src/2021/day01/main2.py +++ b/src/2021/day01/main2.py @@ -10,7 +10,6 @@ def main(): increased = 0 for m in measurements[3:]: - prev_sum = sum(prev) prev.popleft() diff --git a/src/2021/day10/main.py b/src/2021/day10/main.py index 707d371..1956564 100644 --- a/src/2021/day10/main.py +++ b/src/2021/day10/main.py @@ -22,7 +22,6 @@ def score_line(line): def score_line2(line): - stack = deque() for sign in line: if is_opening(sign): diff --git a/src/2022/day05/main.py b/src/2022/day05/main.py index 7bc6477..959b6f4 100644 --- a/src/2022/day05/main.py +++ b/src/2022/day05/main.py @@ -27,7 +27,6 @@ def main(): stacks_part1 = [s.copy() for s in stacks] stacks_part2 = [s.copy() for s in stacks] for move in moves: - for _ in range(move.count): item = stacks_part1[move.from_stack].pop() stacks_part1[move.to_stack].append(item) diff --git a/src/2022/day09/main.py b/src/2022/day09/main.py index 2dbaab6..ff2b8dc 100644 --- a/src/2022/day09/main.py +++ b/src/2022/day09/main.py @@ -30,7 +30,6 @@ def solve(moves, line_len): for direction, count in moves: for _ in range(count): - # move head head_pos = node_to_pos[0] if direction == "U": diff --git a/src/2022/day17/main.py b/src/2022/day17/main.py index 4df88ef..327060b 100644 --- a/src/2022/day17/main.py +++ b/src/2022/day17/main.py @@ -202,7 +202,6 @@ def drop_rock(chamber, directions, rocks): x, y = chamber.get_rock_initial_position(rock) falling = True while falling: - # hot jet direction = directions.next() y2 = y + (1 if direction == Direction.RIGHT else -1) diff --git a/src/2022/day20/main.py b/src/2022/day20/main.py index de7d82d..37da46c 100644 --- a/src/2022/day20/main.py +++ b/src/2022/day20/main.py @@ -67,7 +67,6 @@ def list_to_string(initial_list: List[Number]) -> str: def mix_list(initial_list: List[Number]) -> None: for n in initial_list: - shift = n.value % (len(initial_list) - 1) while shift > 0: diff --git a/src/2022/day24/main.py b/src/2022/day24/main.py index 1d4fef3..c8e97f5 100644 --- a/src/2022/day24/main.py +++ b/src/2022/day24/main.py @@ -211,7 +211,6 @@ def a_star(start_state: State, end_pos: Tuple[int, ...], mazes) -> Tuple[int, St queue.add(f_score[start_state], start_state) while not queue.empty(): - current_state = queue.pop_min() if current_state.distance_to_end(end_pos) == 0: return g_score[current_state], current_state