RosettaCodeData/Task/Sum-to-100/F-Sharp/sum-to-100-3.fs
2023-07-01 13:44:08 -04:00

2 lines
120 B
FSharp

let n,g = N |> Seq.filter(fun n->n.g>=0) |> Seq.countBy(fun n->n.g) |> Seq.maxBy(snd)
printfn "%d has %d solutions" n g