Tap here to switch tabs
Problem
Submissions

Problem: Minimum Operations to Make a Special Number

med
30 min
Try to solve the Minimum Operations to Make a Special Number problem.

Statement

You are given a string num representing a non negative integer.

In one operation, you can pick any digit in num and delete it. If you delete all digits from num, the resulting value is considered to be 00.

An integer is considered special if it is divisible by 2525.

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

Constraints:

  • 1≤1 \leq num.length ≤100\leq 100

  • num consists only of digits ′0′'0' through ′9′'9'.

  • num does not contain any leading zeros.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Operations to Make a Special Number

med
30 min
Try to solve the Minimum Operations to Make a Special Number problem.

Statement

You are given a string num representing a non negative integer.

In one operation, you can pick any digit in num and delete it. If you delete all digits from num, the resulting value is considered to be 00.

An integer is considered special if it is divisible by 2525.

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

Constraints:

  • 1≤1 \leq num.length ≤100\leq 100

  • num consists only of digits ′0′'0' through ′9′'9'.

  • num does not contain any leading zeros.