Files
freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-91-right-triangles-with-integer-coordinates.chinese.md
T

1.1 KiB

id, challengeType, title, videoUrl, localeTitle
id challengeType title videoUrl localeTitle
5900f3c71000cf542c50feda 5 Problem 91: Right triangles with integer coordinates 问题91:带有整数坐标的直角三角形

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,可以形成多少个直角三角形?

Instructions

Tests

tests:
  - text: <code>euler91()</code>应返回<code>euler91()</code> 。
    testString: 'assert.strictEqual(euler91(), 14234, "<code>euler91()</code> should return 14234.");'

Challenge Seed

function euler91() {
  // Good luck!
  return true;
}

euler91();

Solution

// solution required