freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-189-tri-colouring-a...

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: 5900f4291000cf542c50ff3c
challengeType: 5
title: 'Problem 189: Tri-colouring a triangular grid'
videoUrl: ''
localeTitle: 问题189三角网格三色
---
## Description
<section id="description">考虑以下64个三角形的配置 <p>我们希望用三种颜色中的一种为每个三角形的内部着色:红色,绿色或蓝色,这样就不会有两个相邻的三角形具有相同的颜色。这种着色应称为有效。这里,如果两个三角形共享边缘,则称它们是相邻的。注意:如果它们只共享一个顶点,那么它们不是邻居。 </p><p>例如,以下是上面网格的有效着色: </p><p>通过旋转或反射从着色C获得的着色C&#39;被认为与C不同除非两者相同。 </p><p>上述配置有多少种不同的有效着色? </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler189()</code>应该返回10834893628237824。
testString: 'assert.strictEqual(euler189(), 10834893628237824, "<code>euler189()</code> should return 10834893628237824.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler189() {
// Good luck!
return true;
}
euler189();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>