Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-139-pythagorean-tiles.md
2022-01-20 20:30:18 +01:00

47 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f3f71000cf542c50ff0a
title: '問題 139: ピタゴラスのタイル'
challengeType: 5
forumTopicId: 301767
dashedName: problem-139-pythagorean-tiles
---
# --description--
(a, b, c) は、辺の長さが整数である直角三角形を表します。 そのような三角形を 4 つ配置して、辺の長さが c の正方形を作ることができます。
例えば、(3, 4, 5) の三角形を並べると 5 × 5 の正方形ができ、中央に 1 × 1 の穴があります。この 5 × 5 の正方形は、1 × 1 の正方形 25 個で埋めることができます。
<img class="img-responsive center-block" alt="2 つの 5 × 5 の正方形: 1 つ目は、3 × 4 × 5 の三角形を 4 つ配置し中央に 1 x 1 の穴ができたもの。2 つ目は、1 x 1 の正方形を 25 個配置したもの" src="https://cdn.freecodecamp.org/curriculum/project-euler/pythagorean-tiles.png" style="background-color: white; padding: 10px;" />
しかし、(5, 12, 13) の三角形を使うと、穴は 7 × 7 の大きさになります。 これらの 7 x 7 の正方形では、13 x 13 の正方形を埋めることが使用できません。
周長が 1 億未満である直角三角形について、上のように埋めることができるピタゴラスの三角形はいくつありますか。
# --hints--
`pythagoreanTiles()``10057761` を返す必要があります。
```js
assert.strictEqual(pythagoreanTiles(), 10057761);
```
# --seed--
## --seed-contents--
```js
function pythagoreanTiles() {
return true;
}
pythagoreanTiles();
```
# --solutions--
```js
// solution required
```