Sumdiv POJ - 1845 A^b约数之和取模 内部递归 外部分治
Posted ls-joze
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Sumdiv POJ - 1845 A^b约数之和取模 内部递归 外部分治相关的知识,希望对你有一定的参考价值。
Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).
Input
The only line contains the two natural numbers A and B, (0 <= A,B <= 50000000)separated by blanks.
Output
The only line of the output will contain S modulo 9901.
Sample Input
2 3Sample Output
15Hint
2^3 = 8.
The natural divisors of 8 are: 1,2,4,8. Their sum is 15.
15 modulo 9901 is 15 (that should be output).
The natural divisors of 8 are: 1,2,4,8. Their sum is 15.
15 modulo 9901 is 15 (that should be output).
以上是关于Sumdiv POJ - 1845 A^b约数之和取模 内部递归 外部分治的主要内容,如果未能解决你的问题,请参考以下文章
POJ1845 Sumdiv - 乘法逆元+快速幂A^B的约数个数和