#include<bits/stdc++.h>
typedef long long LL;
using namespace std;
const LL Mod=1e9+7;
LL x,n;
int qwe(LL x,LL y)
{
LL t = 1;
while(y){
if(y & 1) t = t * x % Mod;
y /= 2;
x = x * x % Mod;
}
return t;
}
int main(){
while(cin>>x>>n)
cout<<qwe(x,n)<<endl;
return 0;
}
快速幂
最新推荐文章于 2025-08-19 14:14:08 发布