#P1226. 【模板】快速幂
【模板】快速幂
Description
Given three integers , , , compute .
Input Format
The input contains a single line with three integers representing , , .
Output Format
Output one line with the string a^b mod p=s, where , , are the given values and is the result.
2 10 9
2^10 mod 9=7
Hint
Sample Explanation:
,.
Constraints:
For of the testdata, it is guaranteed that , , .
Translated by ChatGPT 5
京公网安备 11011102002149号