initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
module _30
|
||||
|
||||
let sumOfFifth n =
|
||||
common.numDigits n
|
||||
|> Seq.map (fun d -> System.Math.Pow(float d, 5.0))
|
||||
|> Seq.sum
|
||||
|> int
|
||||
|
||||
let isSumOfFifth n =
|
||||
sumOfFifth n = n
|
||||
|
||||
let sumOfSumOfFifthNumbers =
|
||||
[2..200000]
|
||||
|> List.map (fun n -> (n,isSumOfFifth n))
|
||||
|> List.filter (fun r -> snd r)
|
||||
|> List.sumBy fst
|
||||
Reference in New Issue
Block a user