Pagini recente » Cod sursa (job #2980427) | Cod sursa (job #633449) | Cod sursa (job #1260635) | Cod sursa (job #2355627) | Cod sursa (job #2376570)
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MOD = 1999999973;
int n, p;
void read()
{
fin >> n >> p;
}
int pow(int n, int p)
{
long long rez = 1;
while(p)
{
if(p % 2 == 1)
{
rez = (rez * n * 1LL) % MOD;
}
n = (n * n * 1LL) % MOD;
p /= 2;
}
return rez;
}
void write()
{
fout << pow(n, p);
}
int main()
{
read();
write();
return 0;
}