Algorithms
Medium
10033
3239
Minimum Number of Operations to Make X and Y Equal
minimum-number-of-operations-to-make-x-and-y-equal
"""
You are given two positive integers x and y.
In one operation, you can do one of the four following operations:

Divide x by 11 if x is a multiple of 11.
Divide x by 5 if x is a multiple of 5.
Decrement x by 1.
Increment x by 1.

Return the minimum number of operations required to make  x and y equal.

Example 1:

Input: x = 26, y = 1
Output: 3
Explanation: We can make 26 equal to 1 by applying the following operations: 
1. Decrement x by 1
2. Divide x by 5
3. Divide x by 5
It can be shown that 3 is the minimum number of operations required to make 26 equal to 1.

Example 2:

Input: x = 54, y = 2
Output: 4
Explanation: We can make 54 equal to 2 by applying the following operations: 
1. Increment x by 1
2. Divide x by 11 
3. Divide x by 5
4. Increment x by 1
It can be shown that 4 is the minimum number of operations required to make 54 equal to 2.

Example 3:

Input: x = 25, y = 30
Output: 5
Explanation: We can make 25 equal to 30 by applying the following operations: 
1. Increment x by 1
2. Increment x by 1
3. Increment x by 1
4. Increment x by 1
5. Increment x by 1
It can be shown that 5 is the minimum number of operations required to make 25 equal to 30.


Constraints:

1 <= x, y <= 104
"""
class Solution:
    def minimumOperationsToMakeEqual(self, x: int, y: int) -> int:
        
You are given two positive integers x and y.
In one operation, you can do one of the four following operations:

Divide x by 11 if x is a multiple of 11.
Divide x by 5 if x is a multiple of 5.
Decrement x by 1.
Increment x by 1.

Return the minimum number of operations required to make  x and y equal.

Example 1:

Input: x = 26, y = 1
Output: 3
Explanation: We can make 26 equal to 1 by applying the following operations: 
1. Decrement x by 1
2. Divide x by 5
3. Divide x by 5
It can be shown that 3 is the minimum number of operations required to make 26 equal to 1.

Example 2:

Input: x = 54, y = 2
Output: 4
Explanation: We can make 54 equal to 2 by applying the following operations: 
1. Increment x by 1
2. Divide x by 11 
3. Divide x by 5
4. Increment x by 1
It can be shown that 4 is the minimum number of operations required to make 54 equal to 2.

Example 3:

Input: x = 25, y = 30
Output: 5
Explanation: We can make 25 equal to 30 by applying the following operations: 
1. Increment x by 1
2. Increment x by 1
3. Increment x by 1
4. Increment x by 1
5. Increment x by 1
It can be shown that 5 is the minimum number of operations required to make 25 equal to 30.


Constraints:

1 <= x, y <= 104


Please complete the code below to solve above prblem:
```python
class Solution:
    def minimumOperationsToMakeEqual(self, x: int, y: int) -> int:
        
```

my_solution = Solution()

test_input = { "x": 26, "y": 1 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 3

test_input = { "x": 54, "y": 2 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 4

test_input = { "x": 25, "y": 30 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 5

test_input = { "x": 1, "y": 1 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 0

test_input = { "x": 1, "y": 2 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 1

test_input = { "x": 1, "y": 3 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 2

test_input = { "x": 1, "y": 4 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 3

test_input = { "x": 1, "y": 5 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 4

test_input = { "x": 1, "y": 6 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 5

test_input = { "x": 1, "y": 7 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 6

test_input = { "x": 1, "y": 8 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 7

test_input = { "x": 1, "y": 9 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 8

test_input = { "x": 1, "y": 10 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 9

test_input = { "x": 1, "y": 11 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 10

test_input = { "x": 1, "y": 12 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 11

test_input = { "x": 1, "y": 13 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 12

test_input = { "x": 1, "y": 14 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 13

test_input = { "x": 1, "y": 15 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 14

test_input = { "x": 1, "y": 16 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 15

test_input = { "x": 1, "y": 17 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 16

test_input = { "x": 1, "y": 18 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 17

test_input = { "x": 1, "y": 19 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 18

test_input = { "x": 1, "y": 20 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 19

test_input = { "x": 1, "y": 21 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 20

test_input = { "x": 1, "y": 22 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 21

test_input = { "x": 1, "y": 23 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 22

test_input = { "x": 1, "y": 24 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 23

test_input = { "x": 1, "y": 25 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 24

test_input = { "x": 2, "y": 1 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 1

test_input = { "x": 2, "y": 2 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 0

test_input = { "x": 2, "y": 3 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 1

test_input = { "x": 2, "y": 4 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 2

test_input = { "x": 2, "y": 5 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 3

test_input = { "x": 2, "y": 6 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 4

test_input = { "x": 2, "y": 7 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 5

test_input = { "x": 2, "y": 8 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 6

test_input = { "x": 2, "y": 9 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 7

test_input = { "x": 2, "y": 10 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 8

test_input = { "x": 2, "y": 11 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 9

test_input = { "x": 2, "y": 12 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 10

test_input = { "x": 2, "y": 13 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 11

test_input = { "x": 2, "y": 14 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 12

test_input = { "x": 2, "y": 15 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 13

test_input = { "x": 2, "y": 16 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 14

test_input = { "x": 2, "y": 17 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 15

test_input = { "x": 2, "y": 18 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 16

test_input = { "x": 2, "y": 19 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 17

test_input = { "x": 2, "y": 20 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 18

test_input = { "x": 2, "y": 21 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 19

test_input = { "x": 2, "y": 22 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 20

test_input = { "x": 2, "y": 23 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 21

test_input = { "x": 2, "y": 24 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 22

test_input = { "x": 2, "y": 25 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 23

test_input = { "x": 3, "y": 1 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 2

test_input = { "x": 3, "y": 2 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 1

test_input = { "x": 3, "y": 3 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 0

test_input = { "x": 3, "y": 4 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 1

test_input = { "x": 3, "y": 5 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 2

test_input = { "x": 3, "y": 6 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 3

test_input = { "x": 3, "y": 7 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 4

test_input = { "x": 3, "y": 8 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 5

test_input = { "x": 3, "y": 9 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 6

test_input = { "x": 3, "y": 10 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 7

test_input = { "x": 3, "y": 11 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 8

test_input = { "x": 3, "y": 12 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 9

test_input = { "x": 3, "y": 13 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 10

test_input = { "x": 3, "y": 14 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 11

test_input = { "x": 3, "y": 15 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 12

test_input = { "x": 3, "y": 16 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 13

test_input = { "x": 3, "y": 17 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 14

test_input = { "x": 3, "y": 18 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 15

test_input = { "x": 3, "y": 19 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 16

test_input = { "x": 3, "y": 20 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 17

test_input = { "x": 3, "y": 21 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 18

test_input = { "x": 3, "y": 22 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 19

test_input = { "x": 3, "y": 23 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 20

test_input = { "x": 3, "y": 24 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 21

test_input = { "x": 3, "y": 25 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 22

test_input = { "x": 4, "y": 1 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 2

test_input = { "x": 4, "y": 2 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 2

test_input = { "x": 4, "y": 3 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 1

test_input = { "x": 4, "y": 4 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 0

test_input = { "x": 4, "y": 5 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 1

test_input = { "x": 4, "y": 6 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 2

test_input = { "x": 4, "y": 7 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 3

test_input = { "x": 4, "y": 8 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 4

test_input = { "x": 4, "y": 9 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 5

test_input = { "x": 4, "y": 10 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 6

test_input = { "x": 4, "y": 11 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 7

test_input = { "x": 4, "y": 12 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 8

test_input = { "x": 4, "y": 13 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 9

test_input = { "x": 4, "y": 14 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 10

test_input = { "x": 4, "y": 15 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 11

test_input = { "x": 4, "y": 16 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 12

test_input = { "x": 4, "y": 17 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 13

test_input = { "x": 4, "y": 18 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 14

test_input = { "x": 4, "y": 19 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 15

test_input = { "x": 4, "y": 20 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 16

test_input = { "x": 4, "y": 21 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 17

test_input = { "x": 4, "y": 22 }
assert my_solution.minimumOperationsToMakeEqual(**test_input) == 18