这啥?
查看原帖
这啥?
757471
sdsyzdy楼主2022/10/30 22:47
#include<bits/stdc++.h>
using namespace std;
int a,b,p;
int main(){
	//freopen("pow.in","r",stdin);
	//freopen("pow.out","w",stdout);
	scanf("%d%d",&a,&b);
	p=pow(a,b);
	if(p+1==-2147483647) printf("-1");//-2147483648
	else if(p>1e9) printf("-1");
	else printf("%d",p);
}
2022/10/30 22:47
加载中...