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

13 lines
288 B
FSharp

module _97
open System.Numerics
let multiplyLastDigitsFun d =
let l = System.Math.Pow(10.0,float(d))
fun (n, m) -> (n * m) % l
let bigPrime =
let f = multiplyLastDigitsFun 10
let p = [1..7830457] |> Seq.fold (fun s i -> f(s,2.0)) 1.0
(28433.0,p) |> f |> (+) 1.0