@@ -0,0 +1,1084 @@
+package main.algorithm.leetcode;%0A%0Aimport org.junit.Test;%0A%0A/**%0A * Title : main.algorithm.leetcode %3Cbr%3E%0A * Company : %E5%8C%97%E4%BA%AC%E5%8D%8E%E5%AE%87%E5%85%83%E5%85%B8%E4%BF%A1%E6%81%AF%E6%9C%8D%E5%8A%A1%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8 %3Cbr%3E%0A * Description :%0A *   %3Cp%3E Runtime: 6 ms, faster than 100.00%25 of Java online submissions for Palindrome Number.%0A *   %3Cp%3E Memory Usage: 35 MB, less than 100.00%25 of Java online submissions for Palindrome Number.%0A * @author chile%0A * @version 1.0%0A * @date 2019/4/30 13:54%0A */%0Apublic class PalindromeNumber %7B%0A%0A    class Solution %7B%0A        public boolean isPalindrome(int x) %7B%0A            if (x %3C 0) %7B%0A                return false;%0A            %7D%0A%0A            int originX = x;%0A            long result = 0;%0A            while (x != 0) %7B%0A                result = result * 10 + x %25 10;%0A                x /= 10;%0A            %7D%0A%0A            return result == originX;%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void test1() %7B%0A        assert new Solution().isPalindrome(121);%0A    %7D%0A%0A    @Test%0A    public void test2() %7B%0A        assert !new Solution().isPalindrome(-121);%0A    %7D%0A%0A    @Test%0A    public void test3() %7B%0A        assert !new Solution().isPalindrome(10);%0A    %7D%0A%0A%7D%0A

palindrome number