Ezvor

3817. Good Indices in a Digit String

MediumMath Preparing judge… LeetCode
MathString

Hints

Hint 1
For an index i, any valid substring must end exactly at position i.
Hint 2
The substring you are looking for is determined by the decimal digits of i.
Hint 3
For each index i, compare the string form of i with the substring that ends at i and has the same length.