diff --git a/src/Day15/Puzzle1.hs b/src/Day15/Puzzle1.hs index 739db48..2e08e95 100644 --- a/src/Day15/Puzzle1.hs +++ b/src/Day15/Puzzle1.hs @@ -205,4 +205,4 @@ day15_1 = do directions = map (fromJust . getDirection) $ concat d startPos = getStartPosition '@' grid finalGrid = visitGrid startPos directions grid - print . sum $ boxCoords finalGrid + putStrLn $ "Day 15, Puzzle 1 solution: " ++ show (sum $ boxCoords finalGrid) diff --git a/src/Day17/Puzzle1.hs b/src/Day17/Puzzle1.hs index 25f475e..a61b04e 100644 --- a/src/Day17/Puzzle1.hs +++ b/src/Day17/Puzzle1.hs @@ -122,4 +122,5 @@ day17_1 = do registers = map (read . filter isDigit) r prog = map (read . filter isDigit) $ splitOn "," p computer = Computer {registerA = fst . fromJust $ uncons registers, registerB = registers !! 1, registerC = registers !! 2, pointer = 0, program = prog, output = ""} + putStr "Day 17, Puzzle 1 solution: " print . drop 1 . output $ execState runProgram computer