Skip to content

Instantly share code, notes, and snippets.

@dmalikov
Created December 31, 2011 12:56
Show Gist options
  • Save dmalikov/1543932 to your computer and use it in GitHub Desktop.
Save dmalikov/1543932 to your computer and use it in GitHub Desktop.
Project Euler 132 (1s)
import PECore (fastPow)
import Data.Numbers.Primes (primes)
import Control.Arrow ((&&&))
main = print . sum . take 40 . map fst . filter ( (== 1) . snd) . map ( (&&&) id (fastPow 10 (10^9)) ) . dropWhile (<= 3) $ primes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment