PyPE solution to PE problem 39
Registered by
Scott Armitage
PyPE solution to PE problem 39
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Scott Armitage
- Completed by
- Scott Armitage
Related branches
Related bugs
Sprints
Whiteboard
ProjectEule
===
If p is the perimeter of a right angle triangle with integral length sides,
{a,b,c}, there are exactly three solutions for p = 120.
{20,48,52}, {24,45,51}, {30,40,50}
For which value of p <= 1000, is the number of solutions maximised?
Solution
--------
We begin with some properties of right triangles, where c is the hypotenuse.
We know that a+b+c=p (1) and a+b>c (2). Adding c to both sides of (2) and
substituting into (1) we see that p>2c. Since p<=1000, we have that c<500,
and since it is the longest side, we also have a<500 and b<500.
Answer
------
840
(?)