63 lines
1.2 KiB
Markdown
63 lines
1.2 KiB
Markdown
---
|
||
id: 5900f50e1000cf542c510020
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
title: 问题416:青蛙的旅行
|
||
---
|
||
|
||
## Description
|
||
<section id="description">
|
||
一排n个正方形在最左边的正方形中包含一个青蛙。 通过连续跳跃,青蛙到达最右边的方块,然后回到最左边的方块。 在向外旅行中,他向右跳一个,两个或三个方块,在向家旅行中,他以类似的方式向左跳。 他不能跳出广场。 我已经重复了两次往返旅行。
|
||
|
||
令F(m,n)为青蛙可以通过的方式的数目,这样最多一个正方形就不会出现。
|
||
例如,F(1,3)= 4,F(1,4)= 15,F(1,5)= 46,F(2,3)= 16和F(2,100)mod 109 = 429619151。
|
||
|
||
查找F的最后9位数字(10,1012)。
|
||
</section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler416()</code>应该返回898082747。
|
||
testString: assert.strictEqual(euler416(), 898082747);
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler416() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler416();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
|
||
/section>
|