limit. Return how many prime numbers are strictly less than limit.
A prime is a number greater than 1 whose only divisors are 1 and itself.limit=20 → 8
There are eight primes below 20: 2, 3, 5, 7, 11, 13, 17, 19.
limit=3 → 1
Only 2 is prime and below 3. The bound itself does not count, since the primes must be strictly smaller.
limit=1 → 0
limit=20
8
Run checks the first 3 tests in your browser. Submit checks all 33 tests on the server, hidden ones included.