Goffi is doing his math homework and he finds an equality on his text book:gcd(n?a,n)×gcd(n?b,n)=nk .
Goffi wants to know the number of (a,b ) satisfy the equality, ifn andk are given and1≤a,b≤n .
Note:gcd(a,b) means greatest common divisor ofa andb .
Input contains multiple test cases (less than 100). For each test case, there‘s one line containing two integersn andk (1≤n,k≤109 ).
For each test case, output a single integer indicating the number of (a,b ) modulo109+7 .
2 1 3 2
2 1HintFor the first case, (2, 1) and (1, 2) satisfy the equality.
BestCoder Round #6(1003)hdu4983(欧拉函数)
原文地址:http://blog.csdn.net/cq_phqg/article/details/38823081