Nội dung Bài tập
Mã:
ABC171.BaiF
Tên:
ABC171.BaiF
Dạng thi:
oi
Thang điểm:
100 điểm
Giới hạn thời gian:
1 giây
Giới hạn bộ nhớ:
256 MB
Được tạo bởi:
admin

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 (109+7).

Constraints

  • K is an integer between 1 and 106 (inclusive).
  • S is a string of length between 1 and 106 (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 (109+7).


Sample Input 1 Copy

Copy
5
oof

Sample Output 1 Copy

Copy
575111451

For example, we can obtain proofendmoonwolf, and onionpuf, while we cannot obtain oofsixoofelevennnvoxafolt, or fooooooo.


Sample Input 2 Copy

Copy
37564
whydidyoudesertme

Sample Output 2 Copy

Copy
318008117

    Quảng cáo
       Ngôn ngữ : 

       Theme : 
Mời bạn soạn code



		



      Ai có thể xem bài này : 

Thông tin



Phần thảo luận