标签:blog io java div sp log on c r
public class Solution { public boolean isPalindrome(int x) { if (x<0) return false; int highNum = 1; int lowNum = 1; while (x/highNum >= 10 ) highNum *= 10; while (highNum > lowNum) { if ((x/highNum)%10 != (x/lowNum)%10) return false; highNum /= 10; lowNum *= 10; } return true; } }
标签:blog io java div sp log on c r
原文地址:http://www.cnblogs.com/yuhaos/p/3970186.html