c++ | faster than all | easy
\n\n# Code\n\n#define ll long long int\nclass Solution {\npublic:\n    bool ispalin(int z)\n    {\n        string s=to_string(z);\n        int i=0,j=s.length()-
\n\n# Code\n```\n#define ll long long int\nclass Solution {\npublic:\n    bool ispalin(int z)\n    {\n        string s=to_string(z);\n        int i=0,j=s.length()-1;\n        while(i<j)\n        {\n            if(s[i]!=s[j])\n            {\n                return false;\n            }\n            i++;\n            j--;\n        }\n        return true;\n    }\n    bool sieve(int n)\n    {\n        if(n==1)\n        return false;\n        for(ll i=2;i*i<=n;i++)\n        {\n            if(n%i==0)\n            return false;\n        }\n        return true;\n    }\n    int primePalindrome(int n) {\n        if (99899*1e2 <= n && n <= 1e8)\n        return 100030001;\n        for(int j=n;j<1e8;j++)\n        {\n           if(sieve(j))\n          {\n               if(ispalin(j))\n               {\n                    return j;\n               }\n           }\n        }\n        return 0;\n    }\n};\n```
['C++']