Pagini recente » Cod sursa (job #2276001) | Cod sursa (job #2548125) | Cod sursa (job #2711081) | Cod sursa (job #444216) | Cod sursa (job #2638435)
//#include <iostream>
#include <fstream>
#define P 1999999973
using namespace std;
ifstream cin ("lgput.in");
ofstream cout ("lgput.out");
int n,p,k;
int gyorsh (long long a, int n)
{
long long res=1;
while (n>0)
{
if (n&1) res=(res*a)%P;
n>>=1;
a=(a*a)%P;
}
return res%P;
}
int main()
{
ios::sync_with_stdio(false);
cin>>n>>p;
k=gyorsh(n,p);
cout<<k;
return 0;
}