CF1097D.Makoto and a Blackboard
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Makoto has a big blackboard with a positive integer n written on it. He will perform the following action exactly k times:
Suppose the number currently written on the blackboard is v . He will randomly pick one of the divisors of v (possibly 1 and v ) and replace v with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses 58 as his generator seed, each divisor is guaranteed to be chosen with equal probability.
He now wonders what is the expected value of the number written on the blackboard after k steps.
It can be shown that this value can be represented as QP where P and Q are coprime integers and Q≡0(mod109+7) . Print the value of P⋅Q−1 modulo 109+7 .
输入格式
The only line of the input contains two integers n and k ( 1≤n≤1015 , 1≤k≤104 ).
输出格式
Print a single integer — the expected value of the number on the blackboard after k steps as P⋅Q−1(mod109+7) for P , Q defined above.
输入输出样例
输入#1
6 1
输出#1
3
输入#2
6 2
输出#2
875000008
输入#3
60 5
输出#3
237178099
说明/提示
In the first example, after one step, the number written on the blackboard is 1 , 2 , 3 or 6 — each occurring with equal probability. Hence, the answer is 41+2+3+6=3 .
In the second example, the answer is equal to 1⋅169+2⋅163+3⋅163+6⋅161=815 .