# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
4313 | 2013-09-12T09:12:39 Z | zorrapower | Great Pow! (kriii1_G) | C++ | 8996 ms | 1088 KB |
#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); exp%(a+1); } 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 |
---|---|---|---|---|
1 | Correct | 8996 ms | 1088 KB | Output is correct |
2 | Incorrect | 0 ms | 1088 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |