View Code
int fn2(int a,int b,int c){
    int result=1;
    int x=a%c;
    while(b>0){
        if(b%2){
            result=(result*x)%c;
        }
        x=(x*x)%c;
        b/=2;
    }
    return result;
}

 

相关文章:

猜你喜欢
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案