Valeriy 79d9012432 fix(curriculum): quotes in tests (#18828)
* fix(curriculum): tests quotes

* fix(curriculum): fill seed-teardown

* fix(curriculum): fix tests and remove unneeded seed-teardown
2018-10-20 23:32:47 +05:30

1.1 KiB

id, challengeType, title
id challengeType title
5900f4a01000cf542c50ffb2 5 Problem 307: Chip Defects

Description

k defects are randomly distributed amongst n integrated-circuit chips produced by a factory (any number of defects may be found on a chip and each defect is independent of the other defects).

Let p(k,n) represent the probability that there is a chip with at least 3 defects. For instance p(3,7) ≈ 0.0204081633.

Find p(20 000, 1 000 000) and give your answer rounded to 10 decimal places in the form 0.abcdefghij

Instructions

Tests

tests:
  - text: <code>euler307()</code> should return 0.7311720251.
    testString: assert.strictEqual(euler307(), 0.7311720251, '<code>euler307()</code> should return 0.7311720251.');

Challenge Seed

function euler307() {
  // Good luck!
  return true;
}

euler307();

Solution

// solution required