1 solutions
-
0
C++ :
#pragma GCC optimize(3) #include<iostream> #include<math.h> #include<iomanip> #include<cstring> #include<string> #include<algorithm> #include<stdlib.h> #include<stdio.h> #include<limits.h> #include<sstream> #include<vector> #define N 114514 #define eps_0 1e-6 #define eps_1 1e-7 typedef long long ll; typedef long double db; #define sst stringstream using namespace std; ll n,m; int main(void){ cin>>n>>m; if((ll)pow(n,m)<=(ll)pow(10,9)&&(ll)pow(n,m)-pow(n,m)==0){ cout<<(ll)pow(n,m); }else{ cout<<-1; } return 0; }
- 1
Information
- ID
- 9130
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By