Cody

Problem 2370. Fermat's last theorem - again

For a given integer n, express it as a sum of two squares if possible. Return empty matrix otherwise. Solution may not be unique and uniqueness will not be checked, so return one of the solutions. Example:

n=25
Output=[3 4]
n=41
Output=[5 4]
n=7
Output=[]

Solution Stats

59.52% Correct | 40.48% Incorrect
Last solution submitted on Jun 24, 2018

Problem Comments

Recent Solvers21

Suggested Problems

More from this Author45