Definition
A square-free semiprime is a natural number that is the product of two distinct prime numbers.
The task
Given a natural number n
, count all square-free semiprimes less than or equal to n
.
Details
Please write a function or procedure that accepts a single integer parameter and counts all square-free semiprimes less than or equal to its parameter. The count must either be a return value of a function call or be printed to STDOUT.
Scoring
The answer with the fewest number of characters wins.
In the event of a tie, the following criteria will be used in order:
Tallest personBest time-complexity
Worst space-complexity
Examples
f(1) = 0
f(62) = 18
f(420) = 124
f(10000) = 2600
console.log
? \$\endgroup\$