def binom(n, k):
    """Binomial coefficients for :math:`n \choose k`

    :param n,k: non-negative integers
    :complexity: O(k)
    """
    prod = 1
    for i in range(k):
        prod = (prod * (n - i)) // (i + 1)
    return prod
Binomial coefficients for :math:`n \choose k`

    :param n,k: non-negative integers
    :complexity: O(k)