Created
December 31, 2011 12:56
-
-
Save dmalikov/1543932 to your computer and use it in GitHub Desktop.
Project Euler 132 (1s)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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