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.0 KiB
Raw Blame History

id, challengeType, title
id challengeType title
5900f4411000cf542c50ff54 5 Problem 213: Flea Circus

Description

A 30×30 grid of squares contains 900 fleas, initially one flea per square. When a bell is rung, each flea jumps to an adjacent square at random (usually 4 possibilities, except for fleas on the edge of the grid or at the corners).

What is the expected number of unoccupied squares after 50 rings of the bell? Give your answer rounded to six decimal places.

Instructions

Tests

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

Challenge Seed

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

euler213();

Solution

// solution required