Even-dominant Numbers
시간 제한3초메모리 제한2048 MB
각 질의에서 x와 floor(sqrt(x))의 짝수 자릿수가 홀수 자릿수보다 많은 x의 개수를 [l, r] 구간에서 센다.
문제
This is an interactive problem.
Let be an even-dominant number if the total number of even decimal digits of and (the decimal representation of the square root of , rounded down to the nearest integer) is greater than the total number of odd decimal digits of these numbers.
For example, is an even-dominant number because the total number of even digits in and is , which is greater than , the total number of odd digits. However, the number is not an even-dominant number because the total number of even digits in and is equal to the total number of odd digits.
Determine the number of even-dominant numbers in the segment .
입력
The first line contains one integer (): the number of queries.
Each of the next lines contains two integers and () denoting the segment for the -th query.
출력
For each query, print a line with a single integer: the number of even-dominant numbers in the given segment.