算法笔记 快速幂

#include
#include
#include
#include
#include
using namespace std;
//快速幂
typedef long long ll;
int quick_pow(ll a,ll b)//a^b
{
ll res=1;
while(b>0)
{
if(b&1==1) res=resa;
a=a
a;
b>>=1;
}
return res;
}
int main()
{
cout< return 0;
}

你可能感兴趣的:(算法笔记入门篇:模拟,贪心,二分,散列,递归,排序)