#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
现在有 个独立同分布的随机变量 ,它们服从在 的整数上均匀取值的分布,即, 对每个 成立,而对于其他任意的 ,都有 。
求 ,答案可能不是整数,所以你需要输出这个值对 的余数。
Input
输入一行两个整数 。
Output
输出一个整数,表示所求期望对 取模的结果。
Samples
2 2
249561090
Constraints
- ;
- ,且 不为 的倍数。
Note
希望你学过概率论。
对于样例:
有 的概率最大值为 ,有 的概率最大值为 ,所以最大值的期望是 。
Resources
2023 UESTC ICPC Training for Math