Pagini recente » Cod sursa (job #1888747) | Cod sursa (job #2134519) | Cod sursa (job #397342) | Cod sursa (job #1829676) | Cod sursa (job #1238970)
#include <fstream>
using namespace std;
ifstream cin("lgput.in");
ofstream cout("lgput.out");
/*
int ucif(int x, int n,int modul)
{
int tip;
if(n==0) return 1;
if(n%2==1) return (x*ucif(x,n-1,modul))%modul;
tip=ucif(x,n/2,modul)%modul;
return tip*tip%modul;
}*/
long long x, i, j, n, p, k;
int main()
{
cin>>p>>n;
x=p; p=1;
while (n > 0)
{
if (n%2)
{
p *= x %1999999973;
n-- ;
}
x *=x%1999999973;
n/=2;
}
cout<<p;
return 0;
}