http://www.colorless-sight.jp/wiki/?ProjectEular%2FProblem30
-- Problem 30 module Main (main) where import qualified Char as C (digitToInt) main :: IO () main = print $ problem30 problem30 :: Int problem30 = sum [ n | n <- [2..999999], is_sum_5powers n ] is_sum_5powers :: Int -> Bool is_sum_5powers n = n == (sum . map ((^5) . C.digitToInt) . show) n |
最新の20件2023-08-12
2022-12-28
2017-08-15
2014-01-31
2014-01-29
2013-06-04
2012-11-23
2010-08-01
2010-07-24
Tweet
|