freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-208-robot-walks.eng...

1.1 KiB

id challengeType title forumTopicId
5900f43f1000cf542c50ff51 5 Problem 208: Robot Walks 301849

Description

A robot moves in a series of one-fifth circular arcs (72°), with a free choice of a clockwise or an anticlockwise arc for each step, but no turning on the spot.

One of 70932 possible closed paths of 25 arcs starting northward is

Given that the robot starts facing North, how many journeys of 70 arcs in length can it take that return it, after the final arc, to its starting position? (Any arc may be traversed multiple times.)

Instructions

Tests

tests:
  - text: <code>euler208()</code> should return 331951449665644800.
    testString: assert.strictEqual(euler208(), 331951449665644800);

Challenge Seed

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

euler208();

Solution

// solution required