Pagini recente » Cod sursa (job #2308805) | Cod sursa (job #1625873) | Cod sursa (job #2788223) | Cod sursa (job #1008619) | Cod sursa (job #2608977)
#include <iostream>
#include <bitset>
#include <fstream>
#include <math.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MOD = 9973;
inline int putere(int x, int p)
{
int rez = 1;
x %= MOD;
for(; p; p >>= 1)
{
if(p & 1)
{
rez *= x;
rez %= MOD;
}
x *= x;
x %= MOD;
}
return rez;
}
int main()
{
long int a,b;
fin>>a>>b;
fout<<putere(a,b)%1999999973;
return 0;
}