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.
Project Euler #139: Pythagorean tiles
Project Euler #139: Pythagorean tiles
Sort by
recency
|
7 Discussions
|
Please Login in order to post a comment
is this right outputs??
Input (stdin)
5
10000000000
100000000000
1000000000000
10000000000000
100000000000000
Your Output (stdout)
1732807630
17328488665
173286191585
1732866043107
17328673478678
Hey I am new can you tell me how i will get those pythagorean triangles values?
My method works for the given input and even for the other inputs if given explicitly but i don't know how to make it implicit.
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.
Can anyone give me some custom samples to run?
This might be a stupid question, but I can't seem to understand the problem. How come we are not given the size of triangles which are supposed to fill the perimiter P?
Because you're looking for ANY valid triangle size. It's not a fixed perimeter P either, but ANY perimeter below P.