#H2025H. Hrahc Likes 114514
Hrahc Likes 114514
Description
Hrahc is a 24-year-old student. He likes a number very much.
Now Hrahc gets a string with numbers. He wants to know how many times the number appears as a subsequence (not substring, notice that subsequence is not required to be contiguous) in the string.
Format
Input
The first line contains a single integer , the length of the string.
The second line contains a string of length , consisting of digits from to .
Output
Only one integer: the number of times the number appears as a subsequence in the string.
Modulo 114514.
Samples
6
114514
1
7
1114514
3
相关
在下列比赛中: