当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5271:ZYB loves product

题目描述
ZYB loves product very much.He defines the $m-product$ of $n$ is an array $A_1,A_2...A_m$.This array must satisfied $n=\prod_{i=1}^{m}A_i$

Two m-products A and B are different.If there exists an integer i and $A_i \neq B_i$.

So 2=1\*2 and 2=2\*1 are different

We defines the value of an integer $x$ $V(x)=\sum_{d|x}d^k$
Now we defines the value of an $m-product$ A is $\prod_{i=1}^{m}V(A_i)$

ZYB gives you $n$,$k$ and $m$.He wants to know the sum value of all $m-product$ of $n$

Answer may be very large, output the answer modular 998244353 instead.

n will be given by a special way, please read the Input for detail
输入解释
The first line has two integers $m$ and $k$

The second line has an integer $f$

The next $f$ lines have two integers $a_i$ and $p_i$

We define $n=\prod_{i=1}^{f}a_i^{p_i}$

Each of $a_i$ is a prime and any two $a_i$ are different

$1\leq m,k\leq 10^9$,$1\leq f \leq 5$,$2\leq a_i\leq 10^9$,$1\leq p_i \leq 10000$
输出解释
The first line has an integer ans
输入样例
7 11533797
3
2 3
3 1
5 3
输出样例
278603765
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 BestCoder Round #44

源链接: HDU-5271

最后修改于 2020-10-25T23:21:13+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
20000/10000MS(Java/Others) 65536/65536K(Java/Others)