Problems > Palindromic Prime > Editorial

Palindromic Prime — Solution & Editorial

Back to the Problem

Check the string palindrome first (cheap), then √-trial-division primality.

Complexity: O(√N) or better