Pagini recente » Rating Pavel Valeriu (Valias) | Cod sursa (job #2070737) | Cod sursa (job #1960560) | Cod sursa (job #791244) | Cod sursa (job #2026899)
#include <bits/stdc++.h>
#define modulo 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long s = 1;
int p;
int n;
void Citire()
{
fin >> n >> p;
}
void Ridica()
{
while(p > 0)
{
if(p % 2 == 1)
{
s = (1LL * s * n) % modulo;
p--;
}
p /= 2;
n = (1LL * n * n) % modulo;
}
fout << s << "\n";
}
int main()
{
Citire();
Ridica();
return 0;
}