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