Problem 2990 --Easy Math Problem

2990: Easy Math Problem

"
Time Limit $10$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $0$ 正确数量 $0$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签
One day, Touma Kazusa encountered a easy math problem. Given nn and kk, she need to calculate the following sum modulo 1e9+71e9+7
∑ni=1∑nj=1gcd(i,j)klcm(i,j)[gcd(i,j)∈prime]%(1e9+7)∑i=1n∑j=1ngcd(i,j)klcm(i,j)[gcd(i,j)∈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 nn and kk which are separated by spaces. 

1≤n≤1e101≤n≤1e10 
1≤k≤1001≤k≤100 
An integer representing your answer.
1

10 2
2829

推荐代码 查看2990 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$ $ms]
内存最少[$ $KB]
第一AC
第一挑战

赛题来源/所属竞赛 2019 Multi-University Training Contest 3 N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛