[SDOI2017] 序列计数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
Alice 想要得到一个长度为 的序列,序列中的数都是不超过 的正整数,而且这 个数的和是 的倍数。
Alice 还希望,这 个数中,至少有一个数是质数。
Alice 想知道,有多少个序列满足她的要求。
输入格式
一行三个数,。
输出格式
一行一个数,满足 Alice 的要求的序列数量,答案对 取模。
3 5 3
33
提示
对 的数据,。
对 的数据,。
对 的数据,。
对 的数据,$1\leq n \leq 10^9,1\leq m \leq 2\times 10^7,1\leq p\leq 100$。
ch11 - 矩阵快速幂
- Status
- Done
- Problem
- 8
- Open Since
- 2024-1-20 12:00
- Deadline
- 2024-3-3 23:59
- Extension
- 2400 hour(s)