Pagini recente » Cod sursa (job #2666775) | Cod sursa (job #211670) | Cod sursa (job #269770) | Cod sursa (job #551941) | Cod sursa (job #2635019)
#include <stdio.h>
#define MOD 1999999973
using namespace std;
FILE* fin, * fout;
int pow(int x, int e) {
if (e == 0)
return 1;
int t = pow(x, e / 2);
t = (t * t) % MOD;
if (e % 2 == 0) {
return t;
}
else {
return (t * x) % MOD;
}
}
int main()
{
fin = fopen("lgput.in", "r");
fout = fopen("lgput.out", "w");
int x, e;
fscanf(fin, "%i %i", &x, &e);
fprintf(fout,"%i", pow(x, e));
return 0;
}