Pagini recente » Cod sursa (job #2309175) | Cod sursa (job #2145328) | Statistici Marmureanu Tudor (teo_sweetiepie) | Cod sursa (job #4725) | Cod sursa (job #2173695)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long a,b;
long long P(long long a, long long b)
{
if(b==0) return 1;
if(b==1) return a;
else
{
int c=P(a,b/2);
if(b%2==0) return (c*c)%1999999973;
else return (((c*c)%1999999973)*a)%1999999973;
}
}
int main()
{
fin>>a>>b;
fout<<P(a,b);
return 0;
}