大佬们,这个式子代表什么 为什么要引入coff这个量
python吧
全部回复
仅看楼主
level 6
寄寄zi 楼主
2023年02月19日 16点02分 1
level 12
设c(i,k)=coff,则c(i,k+1)=i!/((k+1)!*(i-k-1)!)=i!*(i-k)/(k!*(k+1)*(i-k)!)=i!*(i-k)/(k!*(i-k)!*(k+1))=c(i,k)*(i-k)/(k+1)=coff*(i-k)/(k+1)
2023年02月20日 05点02分 0
level 8
Coff = int(Coff*(i-k)/(k+1)) 这行代码用来计算杨辉三角中每个数字的值。其中Coff表示当前位置的数字,i表示行数,k表示列数。
2023年02月19日 18点02分 2
level 12
[[print(int(__import__('math').factorial(n - 1) / (__import__('math').factorial(m - 1) * __import__('math').factorial(n - m))), end = ' ' if m != n else '\n') for n in range(1, int(row) + 1) for m in range(1, n + 1)] for row in [input()]]
2023年02月19日 23点02分 4
1