Hiring process8 levels
  1. 1 IQ Test
  2. 2 Additional Online Test (If Required)
  3. 3 Office Interview with Hiring Manager
  4. 4 Unpaid Test Task (Motivation Check)
  5. 5 Paid Test Task and Follow-Up Interview
  6. 6 Iterative Paid Test Tasks
  7. 7 Office Verification
  8. 8 Final Interview with the Founder

Problems > The Two Missing Numbers > Editorial

The Two Missing Numbers — Solution & Editorial

Back to the Problem

Compare the expected sum and sum-of-squares with the actual ones: a+b and a²+b² determine a and b via the quadratic (integer square root of the discriminant).

Complexity: O(N)

Watch out: The sum of squares reaches ~1013·N — Python is safe; C++ needs unsigned 64/128 care.