设int a, b; a*b>maxInt 显然是无法判断出结果的。 换个思路使用b>maxInt/a 不就可以了么。 转载于:https://blog.51cto.com/dongdong1314/203399