hunter524 opened this issue 8 years ago · 0 comments
32位正整数最大值 2^31-1 = 2147483647 负整数最大值-2^31 = -2147483648,判断是否溢出时要区分符号,正数时tmp>7则溢出,负数时tmp>8 才溢出。同时也避免了一次取余操作。