47 lines
1.1 KiB
Markdown
47 lines
1.1 KiB
Markdown
---
|
|
id: 5900f43f1000cf542c50ff51
|
|
title: 'Problem 208: Robot Walks'
|
|
challengeType: 5
|
|
forumTopicId: 301849
|
|
dashedName: problem-208-robot-walks
|
|
---
|
|
|
|
# --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
|
|
|
|
<img class="img-responsive center-block" alt="closed path of 25 arcs, starting northward" src="https://cdn.freecodecamp.org/curriculum/project-euler/robot-walks.gif" style="background-color: white; padding: 10px;">
|
|
|
|
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?
|
|
|
|
**Note:** Any arc may be traversed multiple times.
|
|
|
|
# --hints--
|
|
|
|
`robotWalks()` should return `331951449665644800`.
|
|
|
|
```js
|
|
assert.strictEqual(robotWalks(), 331951449665644800);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function robotWalks() {
|
|
|
|
return true;
|
|
}
|
|
|
|
robotWalks();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|