#H1032. 【模板】快速幂
【模板】快速幂
Description
给你三个数 ,请计算 的值。
Format
Input
一行三个数 。
Output
一行一个数,为 的值。
Samples
5 3 7
6
Limitation
数据范围:,,
给你三个数 a,b,p,请计算 abmodp 的值。
一行三个数 a,b,p。
一行一个数,为 abmodp 的值。
5 3 7
6
数据范围:0⩽a,b<231,a+b>0,2⩽p<231
By signing up a HydroOJ universal account, you can submit code and join discussions in all online judging services provided by us.