#P7829. Yukikaze and Smooth numbers
Yukikaze and Smooth numbers
Yukikaze and Smooth numbers
Problem Description
Yukikaze is learning number theory. In number theory, a -smooth number is an integer whose prime factors are all less or equal to . Given and , she wants to know how many -smooth numbers are less or equal to .
Input
The input contains several test cases, and the first line contains a single integer , the number of test cases. Each of the next T lines contains two integers , denoting the question described above.
Output
For each test case, output the answer in a single line.
Sample Input
5
13 2
75 18
38 8
24 7
62 9
Sample Output
4
54
25
18
34
Source
2020 Multi-University Training Contest 6