As Alex is typing, their keyboard is acting strangely. Two letter keys are causing trouble:
• One letter key displays the same wrong letter each time it is pressed. Alex calls this
key the silly key. Oddly, Alex never actually tries to type the wrong letter displayed
by the silly key.
• Another letter key doesn’t display anything when it is pressed. Alex calls this key the
quiet key.
Alex presses the silly key at least once but they don’t necessarily press the quiet key.
Your job is to determine the troublesome keys and the wrong letter that is displayed. Luckily,
this is possible because Alex never presses the silly key immediately after pressing the quiet
key and Alex never presses the quiet key immediately after pressing the silly key.
当Alex正在打字时,他们的键盘表现得很奇怪。两个字母键引起了麻烦:
-
一个字母键每次被按下时都显示同一个错误的字母。Alex称这个键为愚蠢键。奇怪的是,Alex从未真正尝试打出愚蠢键所显示的错误字母。
-
另一个字母键按下时不显示任何东西。Alex称这个键为静音键。
Alex至少按了一次愚蠢键,但不一定按静音键。
你的任务是确定引起麻烦的键和显示的错误字母。幸运的是,这是可能的,因为Alex从不会在按静音键之后立即按愚蠢键,也不会在按愚蠢键之后立即按静音键。