Fix some output
This commit is contained in:
parent
f9513efab4
commit
d9ffa3b0cf
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user