原文地址:http://blog.csdn.net/zhanghuoding/article/details/42719213
想法来自于书中的习题。
Java的话直接输出 Integer.MAX_VALUE 和 Integer.MIN_VALUE 就可以了。