freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-91-right-triangles-with-integer-coordinates.md
2020-10-06 23:10:08 +05:30

1000 B
Raw Blame History

id, challengeType, videoUrl, title
id challengeType videoUrl title
5900f3c71000cf542c50feda 5 问题91带有整数坐标的直角三角形

Description

点Px1y1和Qx2y2绘制在整数坐标处并连接到原点O0,0以形成ΔOPQ。

正好有十四个三角形包含一个直角当每个坐标位于0和2之间时可以形成直角;即0≤x1y1x2y2≤2。

假设0≤x1y1x2y2≤50可以形成多少个直角三角形

Instructions

Tests

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

Challenge Seed

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

euler91();

Solution

// solution required

/section>