My code:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a,b;
int main(){
ios::sync_with_stdio(false);
cin>>a>>b;
if (pow(a,b)<=1000000000) cout<<fixed<<setprecision(0)<<pow(a,b);
else cout<<-1;
return 0;
}
直接用pow都能过)
submission:door