#include <stdio.h>
int myPow(int a, int b, int m) {
int res = 1;
a %= m;
while (b != 0) {
if ((b & 1) == 1)
res = (res * a) % m;
a = (a * a) % m;
b >>= 1;
}
return res;
}
main(){
int s;
s=myPow(418,1,23);
printf("%d",s);
}
取模运算,数论
最新推荐文章于 2024-04-19 09:37:50 发布