快速幂(c++)
#include<iostream>
#include<cstdio>
using namespace std;
typedef long long ll;
ll fastpow(int a,int n){
ll base = a;
ll ans = 1;
while(n){
if(n & 1){
ans *= base;
}
base = base * base;
n = n / 2;
}
return ans;
}
int main()
{
int n, a;
while(cin >> a >> n){
cout << fastpow(a, n) << endl;
}
return 0;
}