freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-228-minkowski-sums.md

57 lines
943 B
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: 5900f4511000cf542c50ff63
title: 问题228Minkowski Sums
challengeType: 5
videoUrl: ''
dashedName: problem-228-minkowski-sums
---
# --description--
设Sn是常规的n边多边形 - 或形状 - 其顶点
vkk = 1,2...n有坐标
```
xk = cos( 2k-1/n ×180° ) yk = sin( 2k-1/n ×180° )
```
每个Sn都被解释为由周边和内部的所有点组成的填充形状。
两个形状S和T的Minkowski和S + T是结果
将S中的每个点添加到T中的每个点其中以坐标方式执行点添加
uv+xy=u + xv + y
例如S3和S4的总和是六边形如下面粉红色所示
S1864 + S1865 + ... + S1909有多少方面
# --hints--
`euler228()`应返回86226。
```js
assert.strictEqual(euler228(), 86226);
```
# --seed--
## --seed-contents--
```js
function euler228() {
return true;
}
euler228();
```
# --solutions--
```js
// solution required
```