#d2666. 数位计算
数位计算
Digit Counting
Problem Description
Given an integer , solve the following problem:
Let the number of positive integers that do not exceed and have the same number of digits as .
Compute , modulo .
Input Format
One integer .
Output Format
One integer — the answer to the problem above, modulo .
Sample Input 1
16
Sample Output 1
73
Sample Explanation
For each from to , the positive integers not exceeding with the same number of digits as are ; hence . For each from to , they are ; hence . The answer is therefore .
Sample Input 2
238
Sample Output 2
13870
Sample Input 3
999999999999999999
Sample Output 3
762062362
Constraints
For all data, , and is an integer.