module Main where import Control.Monad import Input import IntCode main :: IO () main = do initMem <- parse . head <$> getInput 2 let set12 a b mem = head mem : a : b : drop 3 mem run' a b = fst (run (set12 a b initMem) []) !! 0 print (run' 12 2) forM_ [0..99] $ \a -> forM_ [0..99] $ \b -> when (run' a b == 19690720) $ print (100 * a + b)