Back to Freecodecamp

Problem 239: Twenty-two Foolish Primes

curriculum/challenges/english/blocks/project-euler-problems-201-to-300/5900f45c1000cf542c50ff6e.md

latest740 B
Original Source

--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.

js
assert.strictEqual(twentyTwoFoolishPrimes(), 0.001887854841);

--seed--

--seed-contents--

js
function twentyTwoFoolishPrimes() {

  return true;
}

twentyTwoFoolishPrimes();

--solutions--

js
// solution required