Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-187-semiprimes.md
2022-01-20 20:30:18 +01:00

43 lines
936 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4291000cf542c50ff3a
title: '問題 187: 半素数'
challengeType: 5
forumTopicId: 301823
dashedName: problem-187-semiprimes
---
# --description--
合成数は、2 つ以上の素因数が含まれている整数です。 例えば、$15 = 3 × 5, 9 = 3 × 3, 12 = 2 × 2 × 3$ です。
30 未満では、ちょうど 2 つの素因数 (相異なる素因数でなくても良い) が含まれている合成数は 4, 6, 9, 10, 14, 15, 21, 22, 25, 26 の 10 個です。
合成数 $n < {10}^8$ のうち、ちょうど 2 つの素因数からなる合成数 (相異なる素因数でなくても良い) はいくつありますか。
# --hints--
`semiPrimes()``17427258` を返す必要があります。
```js
assert.strictEqual(euler187(), 17427258);
```
# --seed--
## --seed-contents--
```js
function semiPrimes() {
return true;
}
semiPrimes();
```
# --solutions--
```js
// solution required
```