AC

哈基米  •  15天前


include <bits/stdc++.h>

using namespace std;

int main() {

long long a, b;
cin >> a >> b;
long long z = a;
while (b > 1) {
	a = a * z;
	b--;
	if (a  > 1000000000) {
		cout << "-1";
		return 0;
	}

}
cout << a ;
return 0;

}


评论:

请先登录,才能进行评论