ZUFEOJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
7590: Absolute Math
内存限制:262 MB
时间限制:50 S
题面:传统
评测方式:文本比较
上传者:
提交:0
通过:0
提交
提交记录
统计
Web Board
题目描述
Let
f
(
n
)
=
∑
d
|
n
|
μ
(
d
)
|
, where
μ
(
d
)
is
Mobius function
.
Output
∑
m
i
=
1
f
(
n
i
)
.
输入格式
The first line contains an integer
T
(
1
≤
T
≤
10
4
)
- the number of test cases.
Each line of the following
T
lines contains two integers
n
,
m
(
1
≤
n
,
m
≤
10
7
)
.
输出格式
Print the answer modulo
10
9
+
7
for each test case
输入样例
复制
3 6 3 6 2 1 4
输出样例
复制
12 8 7