def pascal(n,k): coeff = 1 for i in range(k): coeff = (coeff*(n-i))//(i+1) return coeff