Files
project-euler/56.fs
T
2025-08-03 20:16:55 -07:00

15 lines
331 B
FSharp

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