#include <iostream>
#include<cmath>
using namespace std;
long long httpswwwmycompileriokonewcpp(long long a,long long n){
if(n==0){
return 1;
}
if (n == 1) {
return a % 1000000007;
}
long long h = httpswwwmycompileriokonewcpp(a,n / 2);
if(n % 2 == 0)
return (h * h) % 1000000007;
else
return ((h * h)%1000000007) * a%1000000007;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
long long n,m;
cin >> n >> m;
cout << httpswwwmycompileriokonewcpp(n,m);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: