| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 49 | 40 | 36 | 80.000% |
When Gleb is not busy with writing long problem statements he enjoys playing with numbers. He picks two integers $l$ and $r$ and tries to find integers $a$ and $b$ such that $l \le a \le b ≤ r$ and the Hamming distance between $a$ and $b$ is maximum possible.
The Hamming distance between two integers $x$ and $y$ is defined as the number of decimal places at which they are different. If these integers are of different length, the shorter one is prepended with leading zeroes.
The first line of the input contains a single integer $l$ and the second line contains a single integer $r$ (1ドル \leq l \leq r \leq 10^{1,000円,000円}$).
Print the maximum possible Hamming distance between a pair of integers in range from $l$ to $r$.
11 17
1
1 11
2
In the first sample, one can choose integers 12ドル$ and 16ドル$. In the second sample, 1ドル$ and 10ドル$ form an optimal answer.