Algorithms
Medium
2844
3046
Minimum Operations to Make a Special Number
minimum-operations-to-make-a-special-number
"""
You are given a 0-indexed string num representing a non-negative integer.

In one operation, you can pick any digit of num and delete it. Note that if you delete all the digits of num, num becomes 0.

Return the minimum number of operations required to make num special.

An integer x is considered special if it is divisible by 25.

Example 1:

Input: num = "2245047"
Output: 2
Explanation: Delete digits num[5] and num[6]. The resulting number is "22450" which is special since it is divisible by 25.
It can be shown that 2 is the minimum number of operations required to get a special number.

Example 2:

Input: num = "2908305"
Output: 3
Explanation: Delete digits num[3], num[4], and num[6]. The resulting number is "2900" which is special since it is divisible by 25.
It can be shown that 3 is the minimum number of operations required to get a special number.

Example 3:

Input: num = "10"
Output: 1
Explanation: Delete digit num[0]. The resulting number is "0" which is special since it is divisible by 25.
It can be shown that 1 is the minimum number of operations required to get a special number.


Constraints:

 * 1 <= num.length <= 100
 * num only consists of digits '0' through '9'.
 * num does not contain any leading zeros.
"""
class Solution:
    def minimumOperations(self, num: str) -> int:
        
You are given a 0-indexed string num representing a non-negative integer.

In one operation, you can pick any digit of num and delete it. Note that if you delete all the digits of num, num becomes 0.

Return the minimum number of operations required to make num special.

An integer x is considered special if it is divisible by 25.

Example 1:

Input: num = "2245047"
Output: 2
Explanation: Delete digits num[5] and num[6]. The resulting number is "22450" which is special since it is divisible by 25.
It can be shown that 2 is the minimum number of operations required to get a special number.

Example 2:

Input: num = "2908305"
Output: 3
Explanation: Delete digits num[3], num[4], and num[6]. The resulting number is "2900" which is special since it is divisible by 25.
It can be shown that 3 is the minimum number of operations required to get a special number.

Example 3:

Input: num = "10"
Output: 1
Explanation: Delete digit num[0]. The resulting number is "0" which is special since it is divisible by 25.
It can be shown that 1 is the minimum number of operations required to get a special number.


Constraints:

 * 1 <= num.length <= 100
 * num only consists of digits '0' through '9'.
 * num does not contain any leading zeros.


Please complete the code below to solve above prblem:
```python
class Solution:
    def minimumOperations(self, num: str) -> int:
        
```

my_solution = Solution()

test_input = { "num": "2245047" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "2908305" }
assert my_solution.minimumOperations(**test_input) == 3

test_input = { "num": "10" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "1" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "2" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "3" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "4" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "5" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "6" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "7" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "8" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "9" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "11" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "12" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "13" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "14" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "15" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "16" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "17" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "18" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "19" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "20" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "21" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "22" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "23" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "24" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "25" }
assert my_solution.minimumOperations(**test_input) == 0

test_input = { "num": "26" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "27" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "28" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "29" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "30" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "31" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "32" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "33" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "34" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "35" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "36" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "37" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "38" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "39" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "40" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "41" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "42" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "43" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "44" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "45" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "46" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "47" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "48" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "49" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "50" }
assert my_solution.minimumOperations(**test_input) == 0

test_input = { "num": "51" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "52" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "53" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "54" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "55" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "56" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "57" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "58" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "59" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "60" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "61" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "62" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "63" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "64" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "65" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "66" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "67" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "68" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "69" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "70" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "71" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "72" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "73" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "74" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "75" }
assert my_solution.minimumOperations(**test_input) == 0

test_input = { "num": "76" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "77" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "78" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "79" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "80" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "81" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "82" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "83" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "84" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "85" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "86" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "87" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "88" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "89" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "90" }
assert my_solution.minimumOperations(**test_input) == 1

test_input = { "num": "91" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "92" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "93" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "94" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "95" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "96" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "97" }
assert my_solution.minimumOperations(**test_input) == 2

test_input = { "num": "98" }
assert my_solution.minimumOperations(**test_input) == 2