Circular Prime
CodeChefOpen on judge ↗
A circular prime is a prime number with the property that the number generated at each intermediate step when cyclically permuting its (base 10) digits will be prime.[1][2] For example 1193 is a circular prime, since 1931, 9311 and 3119 all are also prime Input First line contains an integer N, number of inputs. Second line has space separated N positive integers, none of them greater than 10000
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