You are given two positive integers x and y.
In one operation, you can apply any of the following transformations to x:
Divide x by x is divisible by
Divide x by x is divisible by
Decrement x by
Increment x by
Return the minimum number of operations required to make x equal to y.
Constraints:
x, y
You are given two positive integers x and y.
In one operation, you can apply any of the following transformations to x:
Divide x by x is divisible by
Divide x by x is divisible by
Decrement x by
Increment x by
Return the minimum number of operations required to make x equal to y.
Constraints:
x, y