#P16804. [蓝桥杯 2026 国 Python A] 键盘失灵

    ID: 19145 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及 上传者: 标签>提交答案2026蓝桥杯国赛线性 DP

[蓝桥杯 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 20262026 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 2026060620260606 made up of 2626 lowercase letters (aza \sim z), 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 998244353998244353.

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