#P16804. [蓝桥杯 2026 国 Python A] 键盘失灵
[蓝桥杯 2026 国 Python A] 键盘失灵
Problem Description
Xiao Lan successfully got a great deal in a promotion and bought a high-end mechanical keyboard at a very low price. He thought he had made a huge profit, but unexpectedly, while writing code one day, the keyboard suddenly malfunctioned and completely stopped responding.
After checking the issue and consulting customer service, Xiao Lan learned that the keyboard has a serious defect: once the input keystroke sequence contains at least consecutive identical letters, it will trigger a conflict and cause the keyboard to freeze instantly.
To estimate how this defect affects daily use, Xiao Lan wants to know: among all possible input sequences of length made up of lowercase letters (), how many sequences will trigger this freezing conflict?
Please help Xiao Lan compute the result. Since the final count may be very large, you only need to output the result modulo .
Output Format
This is a fill-in-the-blank output-only problem. You only need to compute the result and submit it. The answer is a single integer. When submitting, you only need to write a program that outputs this integer; any extra content will not receive points.
Hint
Translated by ChatGPT 5