시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB46161534.091%

문제

Define a rainbow number as an integer that, when represented in base $10$ with no leading zeros, has no two adjacent digits the same.

Given lower and upper bounds, count the number of rainbow numbers between them (inclusive).

입력

The first line of input contains a single integer $L$ ($1 \le L < 10^{10^5}$), which is the lower bound.

The second line of input contains a single integer $U$ ($1 \le U < 10^{10^5}$), which is the upper bound.

It is guaranteed that $L \le U$. Note that the limits are not a misprint; $L$ and $U$ can be up to $10^5$ digits long.

출력

Output a single integer, which is the number of rainbow numbers between $L$ and $U$ (inclusive). Because this number may be very large, output it modulo $998,244,353$.

예제 입력 1

1
10

예제 출력 1

10

예제 입력 2

12345
65432

예제 출력 2

35882