CF1097D.Makoto and a Blackboard

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Makoto has a big blackboard with a positive integer nn written on it. He will perform the following action exactly kk times:

Suppose the number currently written on the blackboard is vv . He will randomly pick one of the divisors of vv (possibly 11 and vv ) and replace vv with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses 5858 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 kk steps.

It can be shown that this value can be represented as PQ\frac{P}{Q} where PP and QQ are coprime integers and Q≢0(mod109+7)Q \not\equiv 0 \pmod{10^9+7} . Print the value of PQ1P \cdot Q^{-1} modulo 109+710^9+7 .

输入格式

The only line of the input contains two integers nn and kk ( 1n10151 \leq n \leq 10^{15} , 1k1041 \leq k \leq 10^4 ).

输出格式

Print a single integer — the expected value of the number on the blackboard after kk steps as PQ1(mod109+7)P \cdot Q^{-1} \pmod{10^9+7} for PP , QQ 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 11 , 22 , 33 or 66 — each occurring with equal probability. Hence, the answer is 1+2+3+64=3\frac{1+2+3+6}{4}=3 .

In the second example, the answer is equal to 1916+2316+3316+6116=1581 \cdot \frac{9}{16}+2 \cdot \frac{3}{16}+3 \cdot \frac{3}{16}+6 \cdot \frac{1}{16}=\frac{15}{8} .

首页