# Minimize value of |A – X| + |B – Y| + |C – Z| such that X * Y = Z

Given three integers A, B, and C, the task is to find the minimum possible value of |A – X| + |B – Y| + |C – Z| such that X * Y = Z.Example:Input: A = 19, B = 28, C = 522Output: 2Explanation: The most optimal choice of X, Y, and Z for the given A, B, and C are X = 18, Y = 29, and Z = 522. The equation X * Y = Z holds true and the value of |A – X| + |B – Y| + |C – Z| = 2 which is minimum possible.Input: A = 11, B = 11, C = 121Output: 0Explanation: The given values of A, B, and C satisfies A * B = C. Therefore the most optimal choice is X = A, Y = B, and Z = C.Approach: The above problem can be solved using the following observations:The maximum value of |A – X| + |B – Y| + |C – Z| can be A + B + C for X, Y, and Z equal to 0.Based on the above observation, iterating over all the values of i * j such that i * j