From 6dc92306fce2b3ebe1d5e959d541d8a96c1d6f95 Mon Sep 17 00:00:00 2001 From: Lukas Baumann Date: Wed, 17 Feb 2021 11:18:10 +0100 Subject: [PATCH] Create 4.py --- 15/b/4.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 15/b/4.py diff --git a/15/b/4.py b/15/b/4.py new file mode 100644 index 0000000..da0382c --- /dev/null +++ b/15/b/4.py @@ -0,0 +1,7 @@ +def choose(n, k): + res = n/k + while k > 1: + n-= 1 + k -= 1 + res *= n/k + return res