刚开始做的时候不懂啊,怎么做怎么Time Limit Exceeded,那个心凉啊。 Time limit: 5 Seconds Memory limit: 32768K Total Submit: 4504 Accepted Submit: 862 Give a natural number n (1 <= n <= 500000), please tell the s
题意: f(i)=ik f ( i ) = i k f(i) = i^k sum=f(1)+f(2)+f(3)⋅⋅⋅⋅⋅⋅f(n) s u m = f ( 1 ) + f ( 2 ) + f ( 3 ) · · · · · · f ( n ) sum =f(1) + f(2) + f(3) ······f(n) 给你两个数n,k,求sum。对mod取余。 求幂嘛,,,上来就是快