freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-408-admissible-path...

56 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: 5900f5091000cf542c51001b
challengeType: 5
videoUrl: ''
2020-10-01 15:54:21 +00:00
title: 问题408通过网格的可允许路径
---
## Description
<section id="description">如果xy和x + y都是正的正方形那么我们称格子点xy是不允许的。例如9,16是不允许的0,43,19,4则不允许。 <p>考虑从点x1y1到点x2y2的路径仅使用北或东的单位步长。如果其中间点都不允许我们可以称这样的路径是可以接受的。 </p><p>令Pn是从0,0nn的可允许路径的数量。可以证实P5= 252P16= 596994440和P1000mod 1 000 000 007 = 341920854。 </p><p>求P10 000 000mod 1 000 000 007。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler408()</code>应该返回299742733。
testString: assert.strictEqual(euler408(), 299742733);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler408() {
// Good luck!
return true;
}
euler408();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>