freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-400-fibonacci-tree-...

56 lines
1.5 KiB
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: 5900f4fe1000cf542c510010
challengeType: 5
title: 'Problem 400: Fibonacci tree game'
videoUrl: ''
localeTitle: 问题400斐波纳契树游戏
---
## Description
<section id="description"> Fibonacci树是递归定义为的二叉树T0是空树。 T1是只有一个节点的二叉树。 Tk由具有Tk-1和Tk-2作为子节点的根节点组成。 <p>在这样的树上,两个玩家玩外卖游戏。在每个回合中,玩家选择一个节点并删除该节点以及以该节点为根的子树。被迫占用整棵树根节点的玩家输了。 </p><p>以下是Tk从k = 1到k = 6的第一个回合的第一个玩家的获胜动作。 </p><p>假设fk是在Tk上播放该游戏时在第一轮游戏中第一玩家的获胜移动的数量第二玩家没有获胜策略的移动</p><p>例如f5= 1且f10= 17。 </p><p>找到f10000。给出答案的最后18位数字。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler400()</code>应返回438505383468410600。
testString: 'assert.strictEqual(euler400(), 438505383468410600, "<code>euler400()</code> should return 438505383468410600.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler400() {
// Good luck!
return true;
}
euler400();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>