首页 > Sumdiv
头像 CAICAIIs
发表于 2019-09-09 18:09:49
题目描述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 9 展开全文
头像 威风镰鼬
发表于 2021-08-04 22:21:05
代码 读懂代码前需要掌握的芝士: 唯一分解定理 任意正整数都有且只有一种方式写出其素因子的乘积表达式。 约数和方程 对于已经分解的整数 有A的所有因子之和为 我们先记录素因子,然后利用约数和方程求解。这里有一个二分加速的过程,推导在代码里面。牛客上面有三道Sumdiv大家可以顺便A了。 思路 #i 展开全文