坦率地说,有时在 Python 中使用无限整数是不好的。如果您确实需要 32 位或 64 位操作,最好的选择是使用 NumPy 固定长度类型。
import numpy as np
v = np.uint64(99)
q = np.uint64(12) * v + np.uint64(77)
print(q)
print(type(q))
Run Code Online (Sandbox Code Playgroud)
        |   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           4006 次  |  
        
|   最近记录:  |