We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In the problem description, is perimeter P referring to the perimeter of the triangles? I assume this is the case since otherwise the given test case P = 15 would give a result of 0, since the first Pythagorean triple is (3, 4, 5), which yields a square with perimeter = 20.
EDIT: From testing, this appears to be the case.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #139: Pythagorean tiles
You are viewing a single comment's thread. Return to all comments →
In the problem description, is perimeter P referring to the perimeter of the triangles? I assume this is the case since otherwise the given test case
P = 15
would give a result of0
, since the first Pythagorean triple is(3, 4, 5)
, which yields a square withperimeter = 20
.EDIT: From testing, this appears to be the case.