Back to Primes and Palindromes
CodeChefOpen on judge ↗
Let's get back to the basics. A positive integer is a palindrome if it can be read the same from left to right as well as from right to left. Given a positive integer X as an input, you need to find the smallest palindrome greater than X such that the sum of the palindrome's digits is prime. Input The first input should be a natural number, indicating the number of test cases t (Output For each
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