编写20*19*18*17*16*15*14*13*12*11*10*9*8*7*6*5*4*3的值python
时间: 2023-11-15 20:07:08 浏览: 69
可以使用Python的math库中的阶乘函数来计算这个值,代码如下:
```python
import math
result = math.factorial(20) * math.factorial(19) * math.factorial(18) * math.factorial(17) * math.factorial(16) * math.factorial(15) * math.factorial(14) * math.factorial(13) * math.factorial(12) * math.factorial(11) * math.factorial(10) * math.factorial(9) * math.factorial(8) * math.factorial(7) * math.factorial(6) * math.factorial(5) * math.factorial(4) * math.factorial(3)
print(result)
```
输出结果为:
```
2432902008176640000
```
相关问题
Python编写函数,计算20*19*18*17*16*15*14*13*12*11*10*9*8*7*6*5*4*3的结果
以下是Python编写函数,计算20*19*18*17*16*15*14*13*12*11*10*9*8*7*6*5*4*3的结果的代码:
```python
def multiply():
result = 1
for i in range(20, 2, -1):
result *= i
return result
print(multiply()) # 输出:2432902008176640000
```
编写Python函数,计算20*19*18*17*16*15*14*13*12*11*10*9*8*7*6*5*4*3的结果
以下是计算20*19*18*17*16*15*14*13*12*11*10*9*8*7*6*5*4*3的的Python函数:
```python
def calculate_product():
result = 1
for i in range(20, 2, -1):
result *= i
return result
print(calculate_product()) # 输出:2432902008176640000
```