freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-384-rudin-shapiro-s...

56 lines
1.7 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: 5900f4ed1000cf542c50fffe
challengeType: 5
title: 'Problem 384: Rudin-Shapiro sequence'
videoUrl: ''
localeTitle: 问题384Rudin-Shapiro序列
---
## Description
<section id="description">将序列an定义为n的二进制展开可能重叠中相邻的1对的数量。例如a5= a1012= 0a6= a1102= 1a7= a1112= 2 <p>定义序列bn= - 1an。该序列称为Rudin-Shapiro序列。还要考虑bn的总和序列</p><p>这些序列的前几个值是n 0 1 2 3 4 5 6 7 an0 0 0 1 0 0 1 2 bn1 1 1 -1 1 1 -1 1 sn1 2 3 2 3 4 3 4 </p><p>序列sn具有显着特性即所有元素都是正的并且每个正整数k恰好出现k次。 </p><p>定义gtc其中1≤c≤t作为sn中的索引其中t在sn中出现第c次。例如g3,3= 6g4,2= 7g54321,12345= 1220847710。 </p><p>设Fn为由下式定义的斐波那契数F0= F1= 1且Fn= Fn-1+ Fn-2n&gt; 1。 </p><p>定义GFt= gFtFt-1</p><p>找到ΣGFt为2≤t≤45。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler384()</code>应返回3354706415856333000。
testString: 'assert.strictEqual(euler384(), 3354706415856333000, "<code>euler384()</code> should return 3354706415856333000.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler384() {
// Good luck!
return true;
}
euler384();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>