Solution to Project Euler Problem 35: Circular primes - The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97. How many circular primes are there below one million?


Updated: Oct. 3, 2023 — Training Time: 3 minutes
Overseen by: Archangel Macsika
All Training Resources

Scroll for more menu list

Topic: Project Euler Problem 35: Circular primes.

Difficulty: Easy.

Objective: The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.
There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97.
How many circular primes are there below one million?

Input: None.

Expected Output: 55.

Sikademy Solution in Java Programming Language

Sikademy Solution in Python Programming Language

Was this training resource helpful?