def c1 (n,i): minNI = min(i,n-1) result = 1 for j in range (0,minNI): result = result * (n-j)/(minNI-j) return result print ('更改前C(5,3)数值为:',c1(5,3)) print ('更改前C(100,97)数值为:',c1(100,97)) print ('更改前C(100,3)数值为:',c1(100,3)) #例如更改为//后C(5,2)的结果便不等于10 def c2 (n,i): minNI = m