Problem 30

Again, as in the problem 29, there is not a big deal about the 30th Euler problem:

    import Char

    f = sum [x | x <- [2..10^6], g x == x]
      where g = sum . map (^5) . map digitToInt . show

    main = print f

The execution time was:

real 0m2.494s user 0m2.482s sys 0m0.011s

Published: May 14 2010

blog comments powered by Disqus