#P9777. [HUSTFC 2023] Fujisaki 讨厌数学
[HUSTFC 2023] Fujisaki 讨厌数学
Problem Description
As everyone knows, Fujisaki got very low scores in courses such as Calculus (I) (Part 1), Calculus (I) (Part 2), Linear Algebra, Discrete Mathematics (I), and Probability Theory and Mathematical Statistics. This made him hate advanced mathematics very much, so he brings you an elementary math problem.
Given , where is an integer and , Fujisaki wants you to help him find the value of . It can be proven that for any integer , this value is an integer. Since the result may be very large, you only need to output it modulo .
Input Format
A single line contains three integers , , and , with meanings as described in the statement.
Output Format
Output one integer, representing the answer modulo .
998244353 10 1
10
998244353 2 3
2
100 4 5
24
Hint
Translated by ChatGPT 5