4357: Multiples
内存限制:1024 MB
时间限制:10.000 S
评测方式:文本比较
命题人:
提交:10
解决:2
题目描述
输入
The first input line contains a positive integer, n (1 ≤ n ≤ 100), indicating the number of queries to process. Each query will be on a separate input line and will contain two integers separated by a space: 2 ≤ a ≤ 130, 1 ≤ b ≤ 1015.
输出
For each query, output a single integer on a line by itself indicating the number of integers in the b range that are a multiple of any number in the a range.
样例输入 复制
2
3 30
11 123
样例输出 复制
20
97