csc-python-solutions/15/b/4 - Be Choosy.py

8 lines
103 B
Python
Raw Normal View History

2021-02-17 10:18:10 +00:00
def choose(n, k):
res = n/k
while k > 1:
n-= 1
k -= 1
res *= n/k
return res