Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
def
|
||||
choose( n, k ) | k < 0 or k > n = 0
|
||||
choose( n, 0 ) = 1
|
||||
choose( n, n ) = 1
|
||||
choose( n, k ) = product( [(n - i)/(i + 1) | i <- 0:min( k, n - k )] )
|
||||
|
||||
println( choose(5, 3) )
|
||||
println( choose(60, 30) )
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import integers.factorial
|
||||
|
||||
def
|
||||
binomial( n, k ) | k < 0 or k > n = 0
|
||||
binomial( n, k ) = factorial( n )/factorial( n - k )/factorial( k )
|
||||
Loading…
Add table
Add a link
Reference in a new issue