Skip to content

Solve 2025 day 6#58

Merged
katzuv merged 12 commits into
mainfrom
solve/2025-06
May 8, 2026
Merged

Solve 2025 day 6#58
katzuv merged 12 commits into
mainfrom
solve/2025-06

Conversation

@katzuv

@katzuv katzuv commented May 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

@github-actions github-actions Bot added the Solution Puzzle solution label May 7, 2026
@katzuv katzuv marked this pull request as ready for review May 8, 2026 22:19
Copilot AI review requested due to automatic review settings May 8, 2026 22:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds solutions for 2025 Day 6 parts 1 and 2, including parsing and evaluation logic for the puzzle input format.

Changes:

  • Implemented Part 1 solver with operator-position-based slicing to extract per-column numbers.
  • Implemented Part 2 solver that transposes the input grid to build vertical numbers and applies operators.
  • Added CLI entrypoints for both parts using an embedded example input fallback.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
puzzles/solutions/2025/d06/p1.py Adds Part 1 parsing (get_problems) and evaluation (get_answer) driven by operator positions in the last line.
puzzles/solutions/2025/d06/p2.py Adds Part 2 transpose-based parsing and evaluation using Part 1’s operation map.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread puzzles/solutions/2025/d06/p2.py
Comment thread puzzles/solutions/2025/d06/p2.py
Comment thread puzzles/solutions/2025/d06/p2.py
Comment thread puzzles/solutions/2025/d06/p2.py
Comment thread puzzles/solutions/2025/d06/p2.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 22:24
@katzuv katzuv merged commit 90183bb into main May 8, 2026
3 checks passed
@katzuv katzuv deleted the solve/2025-06 branch May 8, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment on lines +12 to +19
transposed_number_lines = [[]]
for line in number_lines:
try:
transposed_number_lines[-1].append(int("".join(line)))
except ValueError:
# Whitespace column, create a new problem.
transposed_number_lines.append([])



if __name__ == "__main__":
puzzle_input = sys.argv[1] if len(sys.argv) > 1 else p1.input_example
Comment on lines +9 to +13
number_lines = [
[line[column] for line in number_lines] for column in range(columns_count)
]
transposed_number_lines = [[]]
for line in number_lines:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Solution Puzzle solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants