Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
choose(N, 0) -> 1;
|
||||
choose(N, K) when is_integer(N), is_integer(K), (N >= 0), (K >= 0), (N >= K) ->
|
||||
choose(N, K, 1, 1).
|
||||
|
||||
choose(N, K, K, Acc) ->
|
||||
(Acc * (N-K+1)) div K;
|
||||
choose(N, K, I, Acc) ->
|
||||
choose(N, K, I+1, (Acc * (N-I+1)) div I).
|
||||
Loading…
Add table
Add a link
Reference in a new issue