PRIME PALINDROME
CodeChefOpen on judge ↗
An integer is said to be a palindrome if it is equal to its reverse. For example, 79197 and 324423 are palindromes. In this task you will be given an integer N, 1 = N = 1000000. You must find the smallest integer M = N such that M is a prime number and M is a palindrome. For example, if N is 31 then the answer is 101. Input A single integer N, (1 = N = 1000000), on a single line. Output Y
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start