中国开发网: 论坛: 程序员情感CBD: 贴子 775694
virushuo: 试试这个,没在慢的芯片上用过,反正我自己用还成
int calc(int a,int b,int c)
{
int ret=1;
a%=c;
while (true)
{
if (b&1) ret=(ret*a)%c;
if (b>>=1) a=(a*a)%c;
else break;
}
return ret;
}

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录