#1126. zxh的温故知新

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:文本比较
上传者: q3540555

题目描述

This problem is similar to ICPC 2019 Xuzhou Regional C, but they are actually not the same.

Sheauhaw likes to play with positive integers, especially the less-3 numbers in positive integers.

Less-3 number is a special group of positive integers, all of which can be divided by less than three positive integers.

For example, 77 is a less-3 number. There are two positive integers that divide 77 by 11 and 77. 2525 is not a less-3 number. There are 11, 55 and 2525 that can divide 2525.

Now, Sheauhaw is curious about how many less-3 numbers are included between positive integers LL and RR. Please help the curious Sheauhaw to answer his questions.

输入格式

The first line has a positive integer of TT, which represents the total number of test data.

Each test data is a line of two integers L,RL,R.

输出格式

Please output one line for each test data.

For each test data, please output the proportion of less-3 numbers between LL and RR (including LL and RR).

样例

Standard Input

3
7 7
25 25
5 14

Standard Output

1
0
4

数据范围与提示

1T501≤T≤50

1LR1071 \le L \le R \le 10^7