freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-416-a-frogs-trip.md

26 lines
858 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f50e1000cf542c510020
title: 问题416青蛙的旅行
challengeType: 5
videoUrl: ''
---
# --description--
一排n个正方形在最左边的正方形中包含一个青蛙。 通过连续跳跃,青蛙到达最右边的方块,然后回到最左边的方块。 在向外旅行中,他向右跳一个,两个或三个方块,在向家旅行中,他以类似的方式向左跳。 他不能跳出广场。 我已经重复了两次往返旅行。
令Fmn为青蛙可以通过的方式的数目这样最多一个正方形就不会出现。 例如F13= 4F14= 15F15= 46F23= 16和F2100mod 109 = 429619151。
查找F的最后9位数字101012
# --hints--
`euler416()`应该返回898082747。
```js
assert.strictEqual(euler416(), 898082747);
```
# --solutions--