码迷,mamicode.com
首页 > 其他好文 > 详细

Sumdiv POJ - 1845 A^b约数之和取模 内部递归 外部分治

时间:2019-09-22 14:31:20      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:sum   ber   poj   min   determine   部分   lang   外部   and   

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 3
Sample Output
15
Hint
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).
 

Sumdiv POJ - 1845 A^b约数之和取模 内部递归 外部分治

标签:sum   ber   poj   min   determine   部分   lang   外部   and   

原文地址:https://www.cnblogs.com/LS-Joze/p/11567148.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!