Hi I got the following question:
We have a safe with 4 digits (each digit is between 0-9) password. The safe will be open if you give to it a string that contains a sub string with the correct 4 digit password. For example: safe with the code 2345 will be open if you give for example the string '123456'. the safe will be open in this case after the digit 5. you need to give the shortest string that necessarily will open the safe.
I tried many ways but couldn't find a better way than the naive string that contains: 0000000100020003...