# 3417. 求幂

print(a**b)

c++ 的 unsigned long long 轻松水过……

using namespace std;
int main()
{
ios::sync_with_stdio(false);
unsigned a, b;
cin >> a >> b;
unsigned long long ans = a;
while (--b)
ans *= a;
cout << ans;
}


### include

using namespace std;
int flag = 0;
int x = 1;
for (int i = tar.length()-1; i >= 0; i–) {
temp.at(ad.length() - x) = a % 10+48;
if (a >= 10) {
flag = a / 10;
}
else flag = 0;
x++;
}
for (int i = ad.length() - tar.length()-1; i >= 0; i–) {
int a = ad.at(i) + flag-48;
temp.at(i) = a % 10 + 48;
if (a >= 10) {
flag = a / 10;
}
else {
flag = 0;
}
}
if(flag > 0) {
temp.append(“0”);
for (int i = temp.length() - 1; i >= 1; i–) {
temp.at(i) = temp.at(i - 1);
}
temp.at(0) = flag + 48;
}
return temp;
}
string times(string tar,int n) {
int flag = 0;
for (int i = tar.length() - 1; i >= 0; i–) {
int a = ((tar.at(i) - 48) * n)+flag;
tar.at(i) = a % 10 + 48;
if (a >= 10) {
flag = a / 10;
}
else flag = 0;
}if (flag > 0) {
tar.append(“0”);
for (int i = tar.length() - 1; i >= 1; i–) {
tar.at(i) = tar.at(i - 1);
}
tar.at(0) = flag + 48;
}
return tar;
}
string strtimes(string tar,string n){
int loc = 0;
string sum;
for(int i = n.length()- 1; i >= 0; i–) {
string temp = times(tar, n.at(i) - 48);
for (int i = 1; i <= loc; i++) {
temp.append(“0”);
}
loc++;
}
return sum;
}
int main() {
string i;
int n;
std::cin >> i;
std::cin >> n;
string temp = i;
for (int a = 1; a < n; a++) {
temp = strtimes(temp, i);
}cout << temp;
return 0;
}