AtCoder Beginner Contest 171
F
Strivore
AtCoder
⌀ 1795
原题
← E→
翻译中…

Problem Statement

翻译中…

How many strings can be obtained by applying the following operation on a string $S$ exactly $K$ times: "choose one lowercase English letter and insert it somewhere"?

翻译中…

The answer can be enormous, so print it modulo $(10^9+7)$.

翻译中…

Constraints

翻译中…
  • $K$ is an integer between $1$ and $10^6$ (inclusive).
  • $S$ is a string of length between $1$ and $10^6$ (inclusive) consisting of lowercase English letters.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

K
S

翻译中…

Output

翻译中…

Print the number of strings satisfying the condition, modulo $(10^9+7)$.

翻译中…

样例

Input #1
5
oof
Output #1
575111451
For example, we can obtain `proofend`, `moonwolf`, and `onionpuf`, while we cannot obtain `oofsix`, `oofelevennn`, `voxafolt`, or `fooooooo`.
Input #2
37564
whydidyoudesertme
Output #2
318008117
题目信息
题号
abc171_f
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。