Problem 54700. Leyland Primes
24^5+25^12 in test case 6 is greater than 2^53 and therefore cannot be tested using ordinary double precision numbers.
Tim, William, Chris -
The faulty test case has been edited out of the test suite. Apologies for the inconvenience. Please attempt/edit your answer accordingly.
Dyuman, it looks like Test 6 is still being applied.
I thought commenting it out would work, but it didn't. I have removed it completely and rescored the solutions, good to go.
Do rate the problem!
ismember() is not allowed now!
I expected that! But I really couldn't see why one would write a complicated program when there are just a handful of well-known values.
I have written a proper solution now, and it works on everything except Test 6. As Tim has pointed out, the argument in that case is larger than flintmax. isprime() evaluates to zero.
Problem Recent Solvers5
Remove the two elements next to NaN value
Piecewise linear interpolation
Calculate the derivative of a polynomial
More from this Author27
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!