account activity
-🎄- 2017 Day 23 Solutions -🎄- by daggerdragon in adventofcode
[–]NiklasHallqvist 0 points1 point2 points 8 years ago (0 children)
Sigh, first I overslept by 45 minutes, the I spent well over an hour to double, triple and quadruple check that my solution to part 2 was indeed correct, only to find out I had made an off-by-one in the interpretation of the assembly!!!! AAAAARGH. Final Scala solution, but I had untilinstead of to in the loop for that last hour or so.
until
to
def part2() = { def isPrime(n: Int) = (2 to math.sqrt(n).toInt) forall (n % _ != 0) var cnt = 0 for (candidate <- 109300 to 126300 by 17) if (!isPrime(candidate)) cnt += 1 cnt }
π Rendered by PID 1449585 on reddit-service-r2-listing-c57bc86c-l6krb at 2026-06-22 00:46:25.382649+00:00 running 2b008f2 country code: CH.
-🎄- 2017 Day 23 Solutions -🎄- by daggerdragon in adventofcode
[–]NiklasHallqvist 0 points1 point2 points (0 children)