Submission #4313

#TimeUsernameProblemLanguageResultExecution timeMemory
4313zorrapowerGreat Pow! (kriii1_G)C++98
0 / 1
8996 ms1088 KiB
#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 timeMemoryGrader output
Fetching results...