标签:log false turn pre 快速 lse else div 机试
int Plog(int x,int n) { int y,y0; if(n==1) y=x; else{ y0=Plog(x,n/2); y=y0*y0; if(n%2!=0) y=y*x; } return y; }
机试练习总结05:快速幂O(logn)
原文地址:https://www.cnblogs.com/alyssayoung/p/9281460.html