Tap here to switch tabs
Problem
Submissions

Problem: Prime Palindrome

med
30 min
Try to solve the Prime Palindrome problem.

Statement

Given an integer n, find and return the smallest prime palindrome that is greater than or equal to n.

An integer is a prime number if it is strictly greater than 11 and has no positive divisors other than 11 and itself.

An integer is a palindrome if it reads the same forward and backward.

Constraints:

  • 1≤1 \leq n ≤108\leq 10^8

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Prime Palindrome

med
30 min
Try to solve the Prime Palindrome problem.

Statement

Given an integer n, find and return the smallest prime palindrome that is greater than or equal to n.

An integer is a prime number if it is strictly greater than 11 and has no positive divisors other than 11 and itself.

An integer is a palindrome if it reads the same forward and backward.

Constraints:

  • 1≤1 \leq n ≤108\leq 10^8