Description
Given an integer n, return the number of prime numbers that are strictly less than n. A prime number is greater than 1 and has no divisors other than 1 and itself.
Examples
Input:
n = 10Output:
4Explanation:
There are 4 prime numbers less than 10: 2, 3, 5, 7.
Input:
n = 0Output:
0Explanation:
No primes less than 0.
Input:
n = 1Output:
0Explanation:
No primes less than 1.
Constraints
- •
0 ≤ n ≤ 5 × 10⁶