n. Return True if there are integers a and b with a² + b² = n, and False otherwise.
a and b may be equal, and either of them may be zero.n=34 → True
34 = 3² + 5².
n=21 → False
The squares up to 21 are 0, 1, 4, 9 and 16, and no two of them add up to 21.
n=49 → True
49 = 0² + 7²: zero is allowed too.
n=34
True
Run checks the first 3 tests in your browser. Submit checks all 44 tests on the server, hidden ones included.