--- id: 5900f38f1000cf542c50fea2 challengeType: 5 title: 'Problem 35: Circular primes' videoUrl: '' localeTitle: 'Problema 35: Primários Circulares' --- ## Description
O número, 197, é chamado de primo circular porque todas as rotações dos dígitos: 197, 971 e 719 são elas próprias primárias. Existem treze primos abaixo de 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79 e 97. Quantos primos circulares estão abaixo de n, enquanto 100 <= n < = 1000000?
## Instructions
## Tests
```yml tests: - text: circularPrimes(100) deve retornar 13. testString: 'assert(circularPrimes(100) == 13, "circularPrimes(100) should return 13.");' - text: circularPrimes(100000) deve retornar 43. testString: 'assert(circularPrimes(100000) == 43, "circularPrimes(100000) should return 43.");' - text: circularPrimes(250000) deve retornar 45. testString: 'assert(circularPrimes(250000) == 45, "circularPrimes(250000) should return 45.");' - text: circularPrimes(500000) deve retornar 49. testString: 'assert(circularPrimes(500000) == 49, "circularPrimes(500000) should return 49.");' - text: circularPrimes(750000) deve retornar 49. testString: 'assert(circularPrimes(750000) == 49, "circularPrimes(750000) should return 49.");' - text: circularPrimes(1000000) deve retornar 55. testString: 'assert(circularPrimes(1000000) == 55, "circularPrimes(1000000) should return 55.");' ```
## Challenge Seed
```js function circularPrimes(n) { // Good luck! return n; } circularPrimes(1000000); ```
## Solution
```js // solution required ```