CSES - Counting Numbers | Đếm số

View as PDF

Points: 1800 Time limit: 1.0s Memory limit: 512M Input: stdin Output: stdout

Hãy đếm số lượng số nguyên trong đoạn từ \(a\) tới \(b\) mà trong mỗi số đó không có hai chữ số liền kề nào giống nhau.

Input

  • Gồm một dòng duy nhất chứa hai số nguyên \(a\)\(b\).

Output

  • In một số nguyên: đáp án cho vấn đề.

Constraints

  • \(0 \le a \le b \le 10^{18}\)

Example

Sample input

123 321

Sample output

171


Comments

There are no comments at the moment.