#abc242c. C - 1111gal password
C - 1111gal password
Score : points
问题描述
给定一个整数 ,求满足以下所有条件的整数 的个数,结果对 取模。
- 是一个 位正整数。
- 记从上到下 的各位数字为 ,它们满足以下所有条件:
- 对于所有整数 ,有 ;
- 对于所有整数 ,有 。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Given an integer , find the number of integers that satisfy all of the following conditions, modulo .
- is an -digit positive integer.
- Let be the digits of from top to bottom. They satisfy all of the following:
- for all integers ;
- for all integers .
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
4
Sample Output 1
203
Some of the -digit integers satisfying the conditions are .
Sample Input 2
2
Sample Output 2
25
Sample Input 3
1000000
Sample Output 3
248860093
Be sure to find the count modulo .
update @ 2024/3/10 10:25:14