Pagini recente » Cod sursa (job #128689) | Cod sursa (job #70264) | Cod sursa (job #1804577) | Cod sursa (job #1299823) | Cod sursa (job #2635020)
#include <stdio.h>
#define MOD 1999999973
using namespace std;
FILE* fin, * fout;
long long unsigned int pow(int x, int e) {
if (e == 0)
return 1;
long long unsigned 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,"%llu", pow(x, e));
return 0;
}