90啊啊啊
查看原帖
90啊啊啊
1033482
yueyifan楼主2024/10/11 23:49
#include<bits/stdc++.h>
using namespace std;
const long long maxxx=10e9;
int main() {
//	freopen("P8813.in","r",stdin);
	//freopen(".out","w",stdout);
	long long a,b;
	scanf("%lld %lld",&a,&b);
	long long ans=1;
	while(b--) {
		ans*=a;
		if(ans>maxxx) {
			printf("-1\n");
			return 0;
		}
	}
	printf("%lld\n",ans);
	return 0;
}

90pts 什么鬼

2024/10/11 23:49
加载中...