求看看ccf能过吗
查看原帖
求看看ccf能过吗
755230
yangyuhao0102楼主2022/10/29 16:00

code

#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
	freopen("pow.in","r",stdin);
	freopen("pow.out","w",stdout);
	int a,b;
	cin>>a>>b;
	int answer=pow(a,b);
	if(pow(a,b)>2147483647){
		cout<<-1;
	}else{
		cout<<answer;
	}
	fclose(stdin);
	fclose(stdout);
	return 0;
} 

洛谷是100 不知道ccf能弄多少 大神看看

2022/10/29 16:00
加载中...