initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
module _53
|
||||
|
||||
let combinationGt1M =
|
||||
let f =
|
||||
[|0..100|] |> Array.map (fun n -> bigint n) |> Array.map common.factorialI
|
||||
|
||||
let combinations (n, r) =
|
||||
f.[n] / ( f.[r] * f.[n - r] )
|
||||
|
||||
[100..-1..0]
|
||||
|> Seq.sumBy (fun n ->
|
||||
seq { 1 .. n }
|
||||
|> Seq.filter (fun r -> combinations (n,r) > 1000000I )
|
||||
|> Seq.length
|
||||
)
|
||||
Reference in New Issue
Block a user