diff --git a/solutions/src/2024/11.hs b/solutions/src/2024/11.hs index 16a676f..da11628 100644 --- a/solutions/src/2024/11.hs +++ b/solutions/src/2024/11.hs @@ -47,8 +47,7 @@ blinks stones = Map.fromListWith (+) [(stone', n) | (stone, n) <- Map.assocs sto blink :: Int -> [Int] blink 0 = [1] -- 0 -> 1 blink n -- split in half if even length - | let str = show n - , (w, 0) <- length str `quotRem` 2 + | (w, 0) <- length (show n) `quotRem` 2 , (l, r) <- n `quotRem` (10 ^ w) = [l, r] blink n = [n * 2024] -- otherwise multiply by 2024