50求助!!!必关
查看原帖
50求助!!!必关
1363602
yuhongyue楼主2024/9/11 18:19
#include<bits/stdc++.h>
using namespace std;
int n,m,cnt=0;
signed main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	std::cin>>n>>m;
	if(pow(n,m)>2147483647){
		std::cout<<"-1"<<endl;
	}
	else{
		cnt=pow(n,m);
	}
	std::cout<<cnt<<endl;
	return 0;
}
2024/9/11 18:19
加载中...