6
>>> import math
>>> math.pow(2, 3000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: math range error
我该如何解决?溢出错误:数学范围错误
>>> import math
>>> math.pow(2, 3000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: math range error
我该如何解决?溢出错误:数学范围错误
使用内置的操作符。
2**3000
这使用大整数。 – 2010-06-08 03:39:07
@Hamish:是的,它的确如此。 – 2010-06-08 07:16:28