Distinct Parity Excess
시간 제한3초메모리 제한1024 MB
각 구간 [a,b]에서 서로 다른 소인수의 개수가 짝수인 정수의 개수에서 홀수인 정수의 개수를 뺀 값을 구해 출력한다.
문제
A property of any positive integer is its prime parity, which is derived from the count of its distinct prime factors. If this count is even, the prime parity is even; if the count is odd, the prime parity is odd.
You are given a sequence of ranges to test. Each range is given as two numbers and , defining the range from to inclusive. You want to compute the excess of even parity integers over odd parity integers over this range. If there are more odd parity integers, the computed difference will be negative.
입력
The first line of the input contains a single integer , which is the number of ranges to test.
Each of the next lines contains two integers and (), which is a range to test.
출력
Output lines, one for each range in the input. For each range, output a single integer giving the excess of even parity integers over odd parity integers.