euler/Problem048.hs

3 lines
147 B
Haskell

-- Find the last ten digits of the series, 1^1 + 2^2 + 3^3 + ... + 1000^1000.
main = print $ (`mod` 10000000000) $ sum $ map (\n -> n^n) [1..1000]