43 lines
806 B
Markdown
43 lines
806 B
Markdown
---
|
||
id: 5900f3c71000cf542c50feda
|
||
title: 问题91:带有整数坐标的直角三角形
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-91-right-triangles-with-integer-coordinates
|
||
---
|
||
|
||
# --description--
|
||
|
||
点P(x1,y1)和Q(x2,y2)绘制在整数坐标处并连接到原点O(0,0),以形成ΔOPQ。
|
||
|
||
正好有十四个三角形包含一个直角,当每个坐标位于0和2之间时,可以形成直角;即,0≤x1,y1,x2,y2≤2。
|
||
|
||
假设0≤x1,y1,x2,y2≤50,可以形成多少个直角三角形?
|
||
|
||
# --hints--
|
||
|
||
`euler91()`应返回`euler91()` 。
|
||
|
||
```js
|
||
assert.strictEqual(euler91(), 14234);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function rightTrianglesIntCoords() {
|
||
|
||
return true;
|
||
}
|
||
|
||
rightTrianglesIntCoords();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|