atcoder#ABC288F. [ABC288F] Integer Division
[ABC288F] Integer Division
Score : points
Problem Statement
You are given a positive integer with digits in decimal representation. None of the digits of is . For a subset of , let be defined as follows.
See the decimal representation of as a string of length , and decompose it into strings by splitting it between the -th and -th characters if and only if . Then, see these strings as integers in decimal representation, and let be the product of these integers.
There are subsets of , including the empty set, which can be . Find the sum of over all these , modulo .
Constraints
- has digits in decimal representation, none of which is .
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
3
234
418
For , we have . For , we have . For , we have . For , we have . Thus, you should print .
4
5915
17800
9
998244353
258280134