📜  二项式系数python代码示例

📅  最后修改于: 2022-03-11 14:46:56.387000             🧑  作者: Mango

代码示例1
def binomialCoef(n, k): 
    C = [0 for x in range(k+1)]
    C[0] = 1
    for i in range(n+1): 
        for j in range(min(i, k),0,-1):
            C[j] = C[j] + C[j-1]
    return C[k]