31 ms Beats 76.86%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int primePalindrome(int n) {\n        while (true) {\n            if (palindrome(n)&& prime(n))\n                return n;\n            n++;\n            if (10_000_000 < n && n < 100_000_000)\n                n= 100_000_000;\n        }\n    }\n    public boolean prime(int num) {\n       if (num <= 1) return false;  \n        if (num == 2) return true; \n        if (num % 2 == 0) return false; \n        for (int i = 3; i * i <= num; i += 2) {  \n            if (num % i == 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n    public boolean palindrome(int N) {\n         int rev = 0;\n        int Number = N;\n        while (N > 0) {\n            int lastD = N % 10;\n            rev = rev * 10 + lastD;\n            N = N / 10;\n        }\n        return rev == Number;\n    }\n}\n```
['Java']