# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
3428 |
2013-08-31T05:44:44 Z |
ascamper |
Great Pow! (kriii1_G) |
C++ |
|
0 ms |
1852 KB |
#include <iostream>
#include <cmath>
using namespace std;
int gPow(int a, int k){
double p = a;
int result;
for(int i = 0 ; i < k ; i++){
p = pow(a, p);
}
return p;
}
int main(){
int a, k;
cin>>a;cin>>k;
cout<<gPow(a,k)<<endl<<gPow(a,k)%(a+1)<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1852 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |