#include<bits/stdc++.h>
using namespace std;
long long a,b;
int qpow(int a,int b){
int res=1;
while(b>0){
if(b%2==1)res=(long long)res*a;
b/=2;
a=(long long)a*a;
}
return res;
}//a的b次方
int main(){
scanf("%lld%lld",&a,&b);
printf("%lld",qpow(a,b));
return 0;
}
标签:qpow,return,int,res,long,快速,lld
From: https://www.cnblogs.com/hnzzlxs01/p/16655960.html