yaworsw/euler-manager

View on GitHub
data/problems/139.yml

Summary

Maintainability
Test Coverage
---
:id: 139
:name: Pythagorean tiles
:url: https://projecteuler.net/problem=139
:content: |+
  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.

   ![]({{ images_dir }}/p139.gif)

  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?