freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-61-cyclical-figurat...

56 lines
1.8 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: 5900f3a91000cf542c50febc
challengeType: 5
title: 'Problem 61: Cyclical figurate numbers'
videoUrl: ''
localeTitle: 问题61循环图号
---
## Description
<section id="description">三角形,正方形,五边形,六边形,七边形和八边形数字都是图形(多边形)数字,由以下公式生成:三角形<p> P3中n = NN + 1/ 2 </p><p> 1,3,6,10,15 ......方形</p><p> P4 N = N2 </p><p> 1,4,9,16,25 ......五角形</p><p> P5N = N3N-1/ 2 </p><p> 1,5,12,22,35 ......六角形</p><p> P6N = N2N-1 </p><p> 1,6,15,28,45 ...... Heptagonal </p><p> P7N = N5N-3/ 2 </p><p> 1,7,18,34,55......八角形</p><p> P8N = N3N-2 </p><p> 1,8,21,40,65......三个4位数字的有序集合8128,2882,8281有三个有趣的属性。该集合是循环的因为每个数字的最后两位数字是下一个数字的前两位数字包括与第一个数字相关的最后一个数字。每个多边形类型三角形P3,127 = 8128方形P4,91 = 8281和五边形P5,44 = 2882由集合中的不同数字表示。这是具有此属性的唯一一组4位数字。求出六个循环4位数字的唯一有序集合的总和其中每个多边形类型三角形正方形五边形六边形七边形和八边形由集合中的不同数字表示。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler61()</code>应返回28684。
testString: 'assert.strictEqual(euler61(), 28684, "<code>euler61()</code> should return 28684.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler61() {
// Good luck!
return true;
}
euler61();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>