daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def binomialCoefficient(n, k):
  2.     if k > n - k: # take advantage of symmetry
  3.         k = n - k
  4.     c = 1
  5.     for i in range(k):
  6.         c = c * (n - (k - i))
  7.         c = c // i
  8.     return c
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top