且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python长整数输入

更新时间:2023-09-29 09:15:28

n = int(raw_input())

这会将输入转换为整数.由于Python采用任意精度算法,因此我们不必担心数字有多大.

This will convert the input to an integer. Since Python employs arbitrary precision arithmetic, we don't have to worry about how big the number is.

>>> n = int(raw_input())
100000000000000
>>> n
100000000000000L