#P9157. 「GLR-R4」夏至
「GLR-R4」夏至
Background
"The willow courtyard is quiet, people sleep in the daytime; in the daytime people sleep, the quiet wind, the willow courtyard."
Old V said he prepared special zongzi for everyone, so Tianyi came;
Tianyi came, so Ayling came;
Ayling came, and Longya did not dare to stay away either;
When almost half had arrived, the rest of the others all came too...
So why do we have to make up cultural classes after the simulation performance training ends!
"Tianyi, is this math teacher really teaching math?"
"Moke, Ayling and I are counting on you!" Tianyi poked Moke's shoulder in the front row.
"I'm about to derive it, I'm about to derive it..." It was probably the first time Moke had almost filled a draft paper, "I know I'm in a hurry, but let me not be in a hurry first... This feels like having a nightmare."
Summer Solstice "Allow me to escape for a short while this one time, and sometimes try to use my back view, to face the uncertainty of the future."
Problem Description
To check whether Moke is having a nightmare, please solve a simple math problem on the blackboard!
Let the multiplicative function satisfy , where is a given constant, is a prime, and is a positive integer. Now given , compute
$$\left(\sum_{i=1}^n\sum_{j=1}^mf(i\cdot j)\right)\bmod(10^9+7).$$For the definition of a multiplicative function, please refer to "Explanation of the Problem".
Input Format
The input contains only one line with three integers, representing .
Output Format
Output one integer per line, representing the value of the answer modulo .
2 2 64
9
5 5 64
213
1234 1234 12
673319736
30000 10000000 2
836094021
Hint
Explanation of the Problem
For a number-theoretic function and any two coprime positive integers , if it always holds that , then is called a multiplicative function.
When we know the values of a multiplicative function at all prime powers, we can compute its value at any positive integer. Specifically, for , suppose the unique factorization of is $n=p_1^{\alpha_1}p_2^{\alpha_2}\cdots p_k^{\alpha_k}$, then $f(n)=f(p_1^{\alpha_1})f(p_2^{\alpha_2})\cdots f(p_k^{\alpha_k})$.
Constraints and Conventions
For of the testdata, , , .
For different subtasks, the following constraints apply:
| Subtask ID | Subtask Score | |||
|---|---|---|---|---|
Translated by ChatGPT 5