Problem 44319. Write c^3 as sum of two squares a^2+b^2
35.64% Correct | 64.36% Incorrect
Last Solution submitted on Apr 12, 2023
Show 1 older comment
Stephen Cook on 16 Oct 2017
Last test case is wrong. Does not catch 500^3 == 1160^2 + 11120^2 and 500^3 == 2000^2 + 11000^2 .
James on 17 Oct 2017
First case is also wrong: 1^3 = 1^2 + 0^2. The problem doesn't specify positive numbers, so it is a valid solution. (If you *really* want to open a can of worms, a and b don't have to be integers, or even real numbers according to the test suite!)
Mehmet OZC on 18 Oct 2017
You are right James. I have add some sentences to problem definition.
Payam Morsali on 19 Oct 2020
How on earth the leading solution size is 7? can you please provide it also for us ?
Solution CommentsShow comments
Problem Recent Solvers311
Project Euler: Problem 4, Palindromic numbers
More from this Author92
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!