# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
4311 | zorrapower | Great Pow! (kriii1_G) | C++98 | 9028 ms | 1088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
int pow(int low, int exp);
int main(void)
{
int a, k, exp;
scanf("%d %d", &a, &k);
exp=a;
for(int i=1; i<=k; i++){
exp=pow(a, exp);
}
printf("%d", exp%(a+1));
return 0;
}
int pow(int low, int exp){
int result=1;
for(int i=0; i<exp; i++)
result*=low;
return result;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |