parent
09e18ccc4f
commit
bb0178f467
@ -1,2 +1,22 @@
|
|||||||
// For more information see https://aka.ms/fsharp-console-apps
|
// For more information see https://aka.ms/fsharp-console-apps
|
||||||
printfn "Hello from F#"
|
open System.IO
|
||||||
|
|
||||||
|
module EulerProblem105 =
|
||||||
|
let parseInput (filePath: string) =
|
||||||
|
File.ReadAllLines(filePath)
|
||||||
|
|> Array.map (fun line ->
|
||||||
|
line.Split(',')
|
||||||
|
|> Array.map int
|
||||||
|
|> Array.toList)
|
||||||
|
|> Array.toList
|
||||||
|
|
||||||
|
let run filePath =
|
||||||
|
let sets = parseInput filePath
|
||||||
|
printfn "Загружено %d множеств" (List.length sets)
|
||||||
|
0
|
||||||
|
|
||||||
|
[<EntryPoint>]
|
||||||
|
let main argv =
|
||||||
|
let result = EulerProblem105.run "sets.txt"
|
||||||
|
printfn "Результат: %d" result
|
||||||
|
0
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
81,88,75,42,87,84,86,65
|
||||||
|
157,150,164,119,79,159,161,139,158
|
||||||
|
673,465,569,603,524,288,641,632,624
|
||||||
|
375,649,651,638,384,493,445,648,667,669
|
||||||
|
67,196,83,134,322,145,336,342,289,309
|
||||||
|
851,93,893,261,543,535,294,195,122,562
|
||||||
|
302,60,902,38,709,596,89,471,877,741
|
||||||
|
82,113,73,100,87,83,121,122
|
||||||
|
765,468,687,906,863,497,462,777,492,258
|
||||||
|
394,651,362,598,913,192,554,871,362,809
|
||||||
|
631,92,535,196,131,1,606,173,706,193
|
||||||
|
652,343,153,171,288,546,238,366,462,734
|
Loading…
Reference in new issue