Fix Haskell compilation on Arch Linux.

This commit is contained in:
2017-12-27 19:10:40 +01:00
parent 2939822329
commit a751456596
3 changed files with 4 additions and 2 deletions

View File

@@ -2,4 +2,4 @@ all: solution
./$< ./$<
solution: solution.hs solution: solution.hs
ghc $< -o $@ ghc -dynamic $< -o $@

2
2017/day-15/input.txt Normal file
View File

@@ -0,0 +1,2 @@
Generator A starts with 618
Generator B starts with 814

View File

@@ -16,7 +16,7 @@ genB' n = filter (divisible 8) $ genB n
main :: IO () main :: IO ()
main = do main = do
let aStart = 618 let aStart = 618
let bStart = 814 bStart = 814
print $ length $ filter judge $ take 40000000 $ drop 1 $ zip (genA aStart) (genB bStart) print $ length $ filter judge $ take 40000000 $ drop 1 $ zip (genA aStart) (genB bStart)
print $ length $ filter judge $ take 5000000 $ zip (genA' aStart) (genB' bStart) print $ length $ filter judge $ take 5000000 $ zip (genA' aStart) (genB' bStart)