시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 2 2 2 100.000%

문제

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