Skip to content

Commit

Permalink
Brute force the part 2 test data.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWoitaschek committed Dec 17, 2024
1 parent 89123ca commit 7f44348
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion 2024/src/main/kotlin/aoc/year2024/Day17.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ object Day17 : Puzzle<List<Int>, Int>(day = 17) {

override fun solvePart2(input: String): Int {
val computer = Computer.parse(input)
TODO()
var i = 0
while (true) {
i++
val result = computer.copy(a = i).run()
if (result == computer.program) {
return i
}
}
}
}
1 change: 0 additions & 1 deletion 2024/src/test/kotlin/aoc/year2024/Day17Test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class Day17Test {
}

@Test
@Disabled
fun part2TestInput() {
Day17.solvePart2(
"""
Expand Down

0 comments on commit 7f44348

Please sign in to comment.