summaryrefslogtreecommitdiff
path: root/haskell/p7.hs
diff options
context:
space:
mode:
Diffstat (limited to 'haskell/p7.hs')
-rw-r--r--haskell/p7.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/haskell/p7.hs b/haskell/p7.hs
new file mode 100644
index 0000000..fe91b10
--- /dev/null
+++ b/haskell/p7.hs
@@ -0,0 +1,6 @@
+sieve (x:xs) = x : sieve (filter ((/= 0) . (`mod` x)) xs)
+
+p7 :: Int
+p7 = sieve [2..] !! 10000
+
+main = putStrLn $ "Solution: " ++ show p7