Problem 249. Project Euler: Problem 9, Pythagorean numbers
Solution Stats
Problem Comments
-
4 Comments
The description should be 9 + 16 = 5^2 and not 9+16 = 2^5 ?
Thanks Aurelien! Fixed it.
This is an interesting problem. Apparently everyone (including me) had to solve it by a basic brute force method with oly very slight variations. I did manage to use my MATLAB copy to use solve from the symbolic toolbox to get the answers, but the version of MATLAB on which Cody runs doesn't have access to a license for the symbolic toolbox.
@ Doug Hall, I have solved all the problems in the series. However, I have not received the badge and the associated scores on completion of the series. Can you please help me with this?
Solution Comments
-
1 Comment
Multiple solutions exist in the last test case.
-
3 Comments
-
3 Comments
Doug: Just wondering if the last test case is incorrect. It seems like for the input of 3200, the p-triplet should be (700, 1152, 1348) and y_correct should be 1087027200. Please do let me know if I am wrong. Cheers, VL.
There is another one: (640,1200,1360). y_correct = 1044480000.
I just noticed that. I had thrown in a new test suite because someone had hardcoded the solutions in. I guess I did not test it right. Problem solved and submissions are being rescored now.
Problem Recent Solvers712
Suggested Problems
-
Back to basics 22 - Rotate a matrix
825 Solvers
-
Solve the set of simultaneous linear equations
330 Solvers
-
Remove the two elements next to NaN value
515 Solvers
-
2499 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1068 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!