{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"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.\n\nHongshu 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."}},{"title":"Input","value":{"format":"MD","content":"The first line of the input is a integer $T$ ($T\\leq 989$), which stands for the number of test cases you need to solve.\nEach case consists of two integers $A$, $B$ ($0\\leq A\\leq B \u003c 2^{64}$) on a single line."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the number of beautiful palindromes in $[A, B]$."}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1 10\n1 100\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e9\n9\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}