56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
---
|
||
id: 5900f5091000cf542c51001b
|
||
challengeType: 5
|
||
title: 'Problem 408: Admissible paths through a grid'
|
||
videoUrl: ''
|
||
localeTitle: 问题408:通过网格的可允许路径
|
||
---
|
||
|
||
## Description
|
||
<section id="description">如果x,y和x + y都是正的正方形,那么我们称格子点(x,y)是不允许的。例如,(9,16)是不允许的,而(0,4),(3,1)和(9,4)则不允许。 <p>考虑从点(x1,y1)到点(x2,y2)的路径,仅使用北或东的单位步长。如果其中间点都不允许,我们可以称这样的路径是可以接受的。 </p><p>令P(n)是从(0,0)到(n,n)的可允许路径的数量。可以证实P(5)= 252,P(16)= 596994440和P(1000)mod 1 000 000 007 = 341920854。 </p><p>求P(10 000 000)mod 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, "<code>euler408()</code> should return 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>
|