6984329c1ba6c567b9dada1df2d126976011eca9
[advent-of-code-19.git] / advent09 / src / advent09.hs
1 import Intcode
2
3 -- import Data.Text (Text)
4 import qualified Data.Text.IO as TIO
5
6 main :: IO ()
7 main = do
8 text <- TIO.readFile "data/advent09.txt"
9 let mem = parseMachineMemory text
10 print $ part1 mem
11 print $ part2 mem
12
13 part1 mem = head output
14 where (_, _, output) = runProgram [1] mem
15
16 part2 mem = head output
17 where (_, _, output) = runProgram [2] mem
18