freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-128-hexagonal-tile-...

56 lines
1.4 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: 5900f3ec1000cf542c50feff
challengeType: 5
videoUrl: ''
title: 问题128六边形瓷砖差异
---
## Description
<section id="description">编号为1的六边形瓷砖由六个六边形瓷砖环围绕从“12点钟”开始并以逆时针方向对瓷砖2至7进行编号。新环以相同的方式添加下一个环编号为8至19,20至37,38至61依此类推。下图显示了前三个环。 <p>通过找到tile n与其六个邻居中的每一个之间的差异我们将PDn定义为那些作为素数的差异的数量。例如在瓦片8周围顺时针工作差异是12,29,11,6,1和13.因此PD8= 3.以相同的方式瓦片17周围的差异是1,17,16,1 11和10因此PD17= 2.可以证明PDn的最大值是3.如果PDn= 3的所有瓦片按升序列出以形成一个序列第10个瓦片将是271.按此顺序找到第2000个瓦片。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler128()</code>应该返回14516824220。
testString: assert.strictEqual(euler128(), 14516824220);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler128() {
// Good luck!
return true;
}
euler128();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>