当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6607:Easy Math Problem

题目描述
One day, Touma Kazusa encountered a easy math problem. Given $n$ and $k$, she need to calculate the following sum modulo $1e9 + 7$.
$\sum_{i=1}^{n}\sum_{j=1}^{n}gcd(i,j)^klcm(i, j)[gcd(i,j)\in prime]\% (1e9 + 7)$

However, as a poor student, Kazusa obviously did not, so Touma Kazusa went to ask Kitahara Haruki. But Kitahara Haruki is too busy, in order to prove that he is a skilled man, so he threw this problem to you. Can you answer this easy math problem quickly?
输入解释
There are multiple test cases.(T=5) The first line of the input contains an integer T, indicating the number of test cases. For each test case:

There are only two positive integers $n$ and $k$ which are separated by spaces.

$1 \leq n \leq 1e10$
$1 \leq k \leq 100$
输出解释
An integer representing your answer.
输入样例
1

10 2
输出样例
2829
来自杭电HDUOJ的附加信息
Recommend chendu

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6607

最后修改于 2020-10-25T23:32:45+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000/10000MS(Java/Others) 131072/131072K(Java/Others)