60分求调
查看原帖
60分求调
467192
Venti楼主2022/10/29 18:13
#include <bits/stdc++.h>
using namespace std;
int a,b,c;
int main () {
	//freopen ("pow.in","r",stdin);
	//freopen ("pow.out","w",stdout);
    cin >> a >> b;
    c=a;
	for (int i=2;i<=b;i++)
	{
        a=a*c;
	}
    if (b>1000000000)
    {
    	cout << "-1"; 
	}
	else
	cout << a;
	return 0;
}
2022/10/29 18:13
加载中...