#P3263. [JLOI2015] 有意义的字符串
[JLOI2015] 有意义的字符串
Description
Mr. B has two good friends, named Ningning and Ranran. One day, Ranran encountered an interesting problem: given three non-negative integers , compute
$$\left\lfloor \left ( \frac{b+\sqrt{d}}{2} \right ) ^n \right\rfloor \bmod p,$$where .
Input Format
One line containing three non-negative integers , , and .
Output Format
Output a single integer denoting the result modulo 7,528,443,412,579,576,937.
3 13 5
393
5 29 114514
4997196309027367968
Hint
It is guaranteed that , , and , .
Translated by ChatGPT 5
京公网安备 11011102002149号