Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open System.IO
- let convertFile =
- File.ReadAllLines("F#/Euler/8-number.txt")
- |> Seq.concat
- |> Seq.map (fun c -> int32(c.ToString()))
- let calcProduct numbers =
- numbers
- |> Seq.fold (fun acc x -> acc * x) 1
- let findMax =
- convertFile
- |> Seq.windowed(13)
- |> Seq.map (fun x -> calcProduct x)
- |> Seq.max
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement