Skip to content

Commit 5a22993

Browse files
committed
2024.17 Part 2 better starting point
1 parent c6b96a5 commit 5a22993

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

2024/17-computer/main.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func main() {
3838

3939
// Part 2: Find the correct value for A
4040
part2:
41-
for i := 0; ; i++ {
41+
for i := util.IntPow(8, len(instructions)-1); ; i++ {
4242
A, B, C, pc = i, ogB, ogC, 0
4343
output = []int{}
4444

@@ -58,10 +58,6 @@ part2:
5858
fmt.Println(i)
5959
break
6060
}
61-
62-
if i%1e7 == 0 {
63-
fmt.Println(i / 1e7)
64-
}
6561
}
6662
}
6763

0 commit comments

Comments
 (0)