Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 503 Bytes

File metadata and controls

17 lines (13 loc) · 503 Bytes

Instructions

The number 23 is special in the sense that all of its digits are prime numbers. Furthermore, it's a prime itself. There are 4 such numbers between 10 and 100: 23, 37, 53, 73. Let's call these numbers "total primes".

Task

Complete the function that takes a range (a, b) and returns the number of total primes within that range (a <= primes < b). The test ranges go up to 10^7.

Examples

(10, 100)  ==> 4  # 23, 37, 53, 73
(500, 600) ==> 3  # 523, 557, 577