{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\r\n A number is called palindrome if it reads the same forwards as backwards. A palindrome number is called beautiful if it has no adjacent digits of the same. For example, 11 is a palindrome, but it is NOT a beautiful palindrome. 989 is a beautiful palindrome.\u003cbr/\u003eHongshu loves beautiful palindromes so much that he wants to know the number of beautiful palindromes between A and B (inclusive). The range may be very large, so he asks you for help. \u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n The first line of the input is a integer T (T \u003c\u003d 989), which stands for the number of test cases you need to solve.\u003cbr/\u003eEach case consists of two integers “A B” (without quotes) (0 \u003c\u003d A \u003c\u003d B \u003c 2^64) on a single line. \u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n For each case, print the number of beautiful palindromes in [A, B]. \u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n 2\u003cbr/\u003e1 10\u003cbr/\u003e1 100 \u003c/p\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n 9\u003cbr/\u003e9 \u003c/p\u003e"}}]}