← 返回 citadel 的题目列表Expected Keystrokes to Form Specific Words by Random Typing
类型:online_judge
citadel
A programmer is randomly typing keys until the word 'citadel' is formed. What is the expected number of keystrokes to achieve this? If the word 'securities' is never formed, what is the expected number of keystrokes?
Example
Input
abcdefghijklmnopqrstuvwxyz