- 博客(1)
- 收藏
- 关注
原创 最简短总结-整数快速幂
#include int pow3(int a,int b){ int r=1,base=a; while(b!=0){ if(b&1)r*=base; base*=base; b>>=1; } return r; } int main(void){ int a,b; a=3;b=11; printf("%d\n",pow3(a,b)); return 0;
2016-05-29 20:39:15
383
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人