溢出错误:数学范围错误

6 投票
1 回答
4601 浏览
提问于 2025-04-15 23:39
>>> import math
>>> math.pow(2, 3000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: math range error

我该怎么解决这个问题呢?

1 个回答

18

使用内置的操作符。

2**3000

撰写回答