mirror of
https://github.com/mx42/adventofcode.git
synced 2026-01-14 22:09:50 +01:00
Merge AoC 2019 & 2020 Haskell codebases
This commit is contained in:
11
haskellAoC/src/Y2019/Day05.hs
Normal file
11
haskellAoC/src/Y2019/Day05.hs
Normal file
@@ -0,0 +1,11 @@
|
||||
module Y2019.Day05 (day5) where
|
||||
|
||||
import Y2019.Intcode
|
||||
|
||||
day5 :: [String] -> (String, String)
|
||||
day5 (input:_) = (part1, part2)
|
||||
where intCodes = parseProgram input
|
||||
outputP1 = runProgramV2 [1] intCodes
|
||||
part1 = show $ outputP1 !! 0
|
||||
outputP2 = runProgramV2 [5] intCodes
|
||||
part2 = show $ outputP2 !! 0
|
||||
Reference in New Issue
Block a user