* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
43 lines
1.1 KiB
Markdown
43 lines
1.1 KiB
Markdown
---
|
|
id: 5900f3f71000cf542c50ff0a
|
|
title: 'Problem 139: Pythagorean tiles'
|
|
challengeType: 5
|
|
forumTopicId: 301767
|
|
dashedName: problem-139-pythagorean-tiles
|
|
---
|
|
|
|
# --description--
|
|
|
|
Let (a, b, c) represent the three sides of a right angle triangle with integral length sides. It is possible to place four such triangles together to form a square with length c.
|
|
|
|
For example, (3, 4, 5) triangles can be placed together to form a 5 by 5 square with a 1 by 1 hole in the middle and it can be seen that the 5 by 5 square can be tiled with twenty-five 1 by 1 squares.
|
|
|
|
However, if (5, 12, 13) triangles were used then the hole would measure 7 by 7 and these could not be used to tile the 13 by 13 square. Given that the perimeter of the right triangle is less than one-hundred million, how many Pythagorean triangles would allow such a tiling to take place?
|
|
|
|
# --hints--
|
|
|
|
`euler139()` should return 10057761.
|
|
|
|
```js
|
|
assert.strictEqual(euler139(), 10057761);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function euler139() {
|
|
|
|
return true;
|
|
}
|
|
|
|
euler139();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|