luogu#P5091. 【模板】扩展欧拉定理
【模板】扩展欧拉定理
Background
The problem setter also wants to write an interesting statement, but unfortunately does not have the ability.
Problem Description
You are given three positive integers , , and . You need to compute: .
Input Format
One line with three integers, .
Output Format
Output one integer representing the answer.
2 7 4
2
998244353 12345 98765472103312450233333333333
5333
Hint
Pay attention to the input format: represent the base, the modulus, and the exponent, in this order.
[Sample Explanation]
.
[Constraints]
For of the testdata, , , .
Translated by ChatGPT 5