1.3 KiB
1.3 KiB
id | challengeType | title |
---|---|---|
5900f4841000cf542c50ff97 | 5 | Problem 280: Ant and seeds |
Description
At the start of the walk, a seed is placed on each square of the lower row. When the ant isn't carrying a seed and reaches a square of the lower row containing a seed, it will start to carry the seed. The ant will drop the seed on the first empty square of the upper row it eventually reaches.
What's the expected number of steps until all seeds have been dropped in the top row? Give your answer rounded to 6 decimal places.
Instructions
Tests
tests:
- text: <code>euler280()</code> should return 430.088247.
testString: assert.strictEqual(euler280(), 430.088247, '<code>euler280()</code> should return 430.088247.');
Challenge Seed
function euler280() {
// Good luck!
return true;
}
euler280();
Solution
// solution required