#K70407. Counting Special Polynomials
Counting Special Polynomials
Counting Special Polynomials
Given two integers m and k, consider all polynomials P(x) with coefficients in ℤm (i.e. modulo m). We define a polynomial to be special if it satisfies the congruence
P(k) \(\equiv 0 \pmod{m}\)
Determine the number of distinct polynomials P(x) modulo m that satisfy this condition. It turns out that the answer is given by the formula:
\(m^k\)
Your task is to compute \(m^k\) given the integers m and k.
inputFormat
The input consists of a single line containing two space-separated integers m and k.
outputFormat
Output a single integer which is the value of \(m^k\).
## sample5 3
125