#d2498. 加一
加一
Plus One
Problem Description
You are given an integer . You need to perform operations on it. In one operation, you replace every digit with . For example, becomes after one operation.
Find the length of the number after has been operated on times. The answer may be large; output it modulo .
Input Format
The first line contains an integer , the number of test cases.
Each of the next lines contains two integers and , denoting the initial number and the number of operations.
Output Format
For each test case, output the length of the final number, modulo .
Sample Input
5
1912 1
5 6
999 1
88 2
12 100
Sample Output
5
2
6
4
2115
Constraints
For all data, , , .