#Lutece3035. 要挂科了啊啊啊啊啊

要挂科了啊啊啊啊啊

Migrated from Lutece 3035 要挂科了啊啊啊啊啊

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

现在有 nn 个独立同分布的随机变量 X1,X2,,XnX_1,X_2,\dots,X_n,它们服从在 [1,m][1,m] 的整数上均匀取值的分布,即,P(Xi=x)=1mP(X_i=x)=\frac1m 对每个 xZ[1,m]x\in \Z\cap[1,m] 成立,而对于其他任意的 xx,都有 P(Xi=x)=0P(X_i=x)=0

E(maxi=1nXi)E(\max\limits_{i=1}^nX_i),答案可能不是整数,所以你需要输出这个值对 998244353998244353 的余数。

Input

输入一行两个整数 n,mn,m

Output

输出一个整数,表示所求期望对 998244353998244353 取模的结果。

Samples

2 2
249561090

Constraints

  • 1n1051\le n\le 10^5
  • 1m10181\le m\le10^{18},且 mm 不为 998244353998244353 的倍数。

Note

希望你学过概率论。

对于样例:

14\frac14 的概率最大值为 11,有 34\frac34 的概率最大值为 22,所以最大值的期望是 74\frac74

Resources

2023 UESTC ICPC Training for Math