Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.md
gikf a9418a1fe9 fix(curriculum): clean-up Project Euler 221-240 (#42839)
* fix: clean-up Project Euler 221-240

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-15 14:26:34 +02:00

915 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f45c1000cf542c50ff6e Problem 239: Twenty-two Foolish Primes 5 301884 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--

twentyTwoFoolishPrimes() should return 0.001887854841.

assert.strictEqual(twentyTwoFoolishPrimes(), 0.001887854841);

--seed--

--seed-contents--

function twentyTwoFoolishPrimes() {

  return true;
}

twentyTwoFoolishPrimes();

--solutions--

// solution required