-- Find the sum of all the numbers that can be written as the sum of fifth -- powers of their digits. import Euler main = print $ sum $ filter (\n -> sum (map (^5) (toDigits n)) == n) [2..(6 * 9^5)]