#arc178b. B - 1 + 6 = 7
B - 1 + 6 = 7
Score : points
问题陈述
给定正整数 。找出满足以下所有条件的正整数元组 的数量,对 取模。
- 是一个正整数,用十进制表示有 位数字。
- 是一个正整数,用十进制表示有 位数字。
- 是一个正整数,用十进制表示有 位数字。
- 。
输入文件中每个测试用例 个,解决每一个。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
You are given positive integers . Find the number, modulo , of tuples of positive integers that satisfy all of the following conditions.
- is a positive integer with digits in decimal notation.
- is a positive integer with digits in decimal notation.
- is a positive integer with digits in decimal notation.
- .
You are given test cases per input file; solve each of them.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Each case is given in the following format:
Output
Print lines. The -th line should contain the answer for .
Sample Input 1
4
1 1 1
1 6 7
167 167 167
111 666 777
Sample Output 1
36
45
731780675
0
For the first case, tuples such as satisfy the conditions.
On the other hand, tuples such as do not.
There are tuples that satisfy the conditions, so print .
For the third case, remember to print the result modulo .
For the fourth case, there may be no tuples that satisfy the conditions.