Deloitte | OA | Points Satisfying Given Conditions
Anonymous User
246
Jan 02, 2023
Points Satisfying Given Conditions
Given the equation f(x, y) = x^2 + 5xy + 3y^2 and an integer N, count the number of points (x, y) which satisfies the following conditions:
xandymust be co primes.- On substituting the
xandyvalues in the equation resultant value must be less thN. - The result of the equation after substituting x and y value must be a perfect square.
Example:
Input: N = 10
Output: 1
Explanation: (1, 1) is the only point which satifies all of the given conditions.Constraints:
1 <= N <= 10000
Comments (4)


