Back to Freecodecamp

Problem 187: Semiprimes

curriculum/challenges/english/blocks/project-euler-problems-101-to-200/5900f4291000cf542c50ff3a.md

latest651 B
Original Source

--description--

A composite is a number containing at least two prime factors. For example, $15 = 3 × 5; 9 = 3 × 3; 12 = 2 × 2 × 3$.

There are ten composites below thirty containing precisely two, not necessarily distinct, prime factors: 4, 6, 9, 10, 14, 15, 21, 22, 25, 26.

How many composite integers, $n < {10}^8$, have precisely two, not necessarily distinct, prime factors?

--hints--

semiPrimes() should return 17427258.

js
assert.strictEqual(semiPrimes(), 17427258);

--seed--

--seed-contents--

js
function semiPrimes() {

  return true;
}

semiPrimes();

--solutions--

js
// solution required