#abc238c. C - digitnum
C - digitnum
Score : points
问题描述
给定一个整数 ,解决以下问题。
令函数 表示(不超过 的具有与 相同位数的正整数的数量)。
求 对于模数 的结果。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Given an integer , solve the following problem.
Let (The number of positive integers at most with the same number of digits as ).
Find modulo .
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
16
Sample Output 1
73
- For a positive integer between and , the positive integers at most with the same number of digits as are .
- Thus, we have .
- For a positive integer between and , the positive integers at most with the same number of digits as are .
- Thus, we have .
The final answer is .
Sample Input 2
238
Sample Output 2
13870
Sample Input 3
999999999999999999
Sample Output 3
762062362
Be sure to find the sum modulo .
update @ 2024/3/10 10:17:04