1489. EXcellent Number

We call a number EXcellent if it divided by 11 euqals 0 or it contains the number k, see sample for details.

Now we want to know how many EXcellent numbers are between [0, 10^n]?

Since this number can be very large, print the remainder when it's divided by lovely 998244353.

输入

The first line contains an integer T(T \leq 10) — the number of test cases you need to solve.

The only line of each test case contains 2 integers n, k(1 \leq n \leq 10^6,1 \leq k \leq 2 \times 10^5) without leading zeros.

输出

For each test case, print the result mod lovely 998244353.

样例

标准输入 复制文本
3
1 1
2 12
666 233
标准输出 复制文本
3
11
828654121

提示

In the first example, there are 0,1,10

In the second example, there are 0,11,12,22,33,44,55,66,77,88,99

来源

2021 GDCPC 广东省大学生程序设计竞赛

登录以提交代码。
单点时限 2 秒
内存限制 512 MB
提交 9
通过 5