daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 60 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
Top