* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
43 lines
857 B
Markdown
43 lines
857 B
Markdown
---
|
|
id: 5900f45c1000cf542c50ff6e
|
|
title: 'Problem 239: Twenty-two Foolish Primes'
|
|
challengeType: 5
|
|
forumTopicId: 301884
|
|
dashedName: problem-239-twenty-two-foolish-primes
|
|
---
|
|
|
|
# --description--
|
|
|
|
A set of disks numbered 1 through 100 are placed in a line in random order.
|
|
|
|
What is the probability that we have a partial derangement such that exactly 22 prime number discs are found away from their natural positions? (Any number of non-prime disks may also be found in or out of their natural positions.)
|
|
|
|
Give your answer rounded to 12 places behind the decimal point in the form 0.abcdefghijkl.
|
|
|
|
# --hints--
|
|
|
|
`euler239()` should return 0.001887854841.
|
|
|
|
```js
|
|
assert.strictEqual(euler239(), 0.001887854841);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function euler239() {
|
|
|
|
return true;
|
|
}
|
|
|
|
euler239();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|