Rainbow Numbers

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Define a rainbow number as an integer that, when represented in base 1010 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 LL (1L<101051 \le L < 10^{10^5}), which is the lower bound.

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

It is guaranteed that LUL \le U. Note that the limits are not a misprint; LL and UU can be up to 10510^5 digits long.

출력

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