Primes and XOR? Nonsense
시간 제한2초메모리 제한1024 MB
[L, R] 구간 소수들의 부분집합 XOR로 만들 수 있는 정수의 개수를 센다. R은 10^12까지 커질 수 있다.
문제
Define , where is the set of prime numbers. In other words, is the set of all primes between and inclusive.
Given and , find the number of integers that can be represented as XOR of some (possibly empty) subset of .
입력
The first line of input contains one integer () --- the number of independent test cases you need to process. Descriptions of test cases follow.
The description of one test case consists of two integers and ().
출력
For each test case print the answer on a separate line.
힌트
In the first example, .
In the second example, , so only can be represented as XOR of some subset.