initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
module _56
|
||||
|
||||
open System.Numerics
|
||||
|
||||
let exponentialDigitSum =
|
||||
let powDigitSum (a, b) =
|
||||
BigInteger.Pow(a,b)
|
||||
|> common.numDigits
|
||||
|> Seq.sum
|
||||
|
||||
let third (_, _, c) = c
|
||||
|
||||
common.crossMap (fun a b -> (a,b)) [2I..100I] [2..10]
|
||||
|> Seq.map (fun (a,b) -> (a,b,powDigitSum (a,b)))
|
||||
|> Seq.maxBy third
|
||||
Reference in New Issue
Block a user