Last active
November 16, 2017 05:07
-
-
Save EsauPR/c06440116d89d7436c143a91c7525396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define MOD 10000 | |
int main(int argc, char const *argv[]) { | |
int N, P, result = 1; | |
scanf("%d %d", &N, &P); | |
for (int i = 0; i < P; i++) { | |
result = (result * (N % MOD)) % MOD; | |
} | |
printf("%d\n", result); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment