(RankList for this Question)
Tanya's keyboard has been acting up. While typing, it often presses extra buttons and adds extra letters to the words.
Tanya being a smart problem solver got fed up with correcting his mistakes herself, that’s why she decided to invent the function that will correct the words itself.
After analyzing the cases, all one needs is to delete one letter for the word to make the word correct. Solve this task for her: she has a printed word and a word from the dictionary, and you should delete one letter from the first word to get the second one. Which letter would you delete?
1 <= str.length() <= 10^6
The input data contains two strings, consisting of lower-case Latin letters. The length of each string is from 1 to 10^6 symbols inclusive, the first string contains exactly 1 symbol more than the second one.
In the first line output the "number of positions" of the symbols in the first string, after the deletion of which the first string becomes identical to the second one.
The only letter that can be deleted is at index 3.
Any letter can be deleted here.
It is impossible to make the first string identical to the second string by deleting one symbol, hence output is 0.
Log In to solve the Question