#P16722. 基础模形式练习题
基础模形式练习题
Background
As everyone knows the following identities hold for any positive integer :
How can this property be generalized to the general case?
Problem Description
Let
Given positive integers , where is guaranteed to be a prime, find the coefficient of in .
The answer may be very large; you only need to output it modulo .
Input Format
One line containing three positive integers .
Output Format
Output one integer on one line, representing the answer modulo .
2 4 3
258593760
5 6 6
177906112
3 18 8
566697133
2 24 17
401935277
2 96 18
36903708
Hint
This problem uses bundled testdata.
Subtask 1 (10 pts): ;
Subtask 2 (20 pts): ;
Subtask 3 (30 pts): ;
Subtask 4 (40 pts): No special constraints.
For all testdata: , , .
Translated by ChatGPT 5