Update 4 - Be Choosy.py

This commit is contained in:
Lukas Baumann 2021-02-22 11:39:56 +01:00 committed by GitHub
parent 665b8f3835
commit bea99e5e1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
def choose(n, k): def choose(n, k):
res = n/k res = n/k
while k > 1: while k > 1:
n-= 1 n -= 1
k -= 1 k -= 1
res *= n/k res *= n/k
return res return res