Thursday, 12 August 2010
97
Again this one is too easy in haskell, although this isn't the best solution, it's very simple.
module P97 where bigprime :: Integer bigprime = 1 + 28433 * 2^7830457 p97 = reverse . take 10 . reverse $ show bigprime
Wednesday, 11 August 2010
#38
Incredibly simple for haskell (and quick)
module P48 where p48 :: Integer -> String p48 n = reverse . take 10 . reverse . show $ foldr (\x a -> a + (x^x)) 0 [1..n]then call p48 1000.
Subscribe to:
Posts (Atom)