summaryrefslogtreecommitdiff
path: root/haskell/p7.hs
blob: fe91b109afd2fedf1b1a801a15d26000d18d842c (plain) (blame)
1
2
3
4
5
6
sieve (x:xs) = x : sieve (filter ((/= 0) . (`mod` x)) xs)

p7 :: Int
p7 = sieve [2..] !! 10000

main = putStrLn $ "Solution: " ++ show p7