mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 12:50:32 +01:00
Fix Haskell compilation on Arch Linux.
This commit is contained in:
@@ -2,4 +2,4 @@ all: solution
|
||||
./$<
|
||||
|
||||
solution: solution.hs
|
||||
ghc $< -o $@
|
||||
ghc -dynamic $< -o $@
|
||||
|
||||
2
2017/day-15/input.txt
Normal file
2
2017/day-15/input.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Generator A starts with 618
|
||||
Generator B starts with 814
|
||||
@@ -16,7 +16,7 @@ genB' n = filter (divisible 8) $ genB n
|
||||
main :: IO ()
|
||||
main = do
|
||||
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 5000000 $ zip (genA' aStart) (genB' bStart)
|
||||
|
||||
Reference in New Issue
Block a user