MATH_BUG02

Given a non negative integer A,
following code tries to find all pair of integers (a, b) such that

  • a and b are positive integers
  • a <= b, and
  • a2 + b2 = A.
  • 0 <= A <= 100000

However, the code has a small bug. Correct the bug and submit the code.

Interview Code Editor
Hints
  • Solution Approach
  • Complete Solution
8441 successful submissions.
Click here to jump start your coding interview preparation