Pagini recente » Cod sursa (job #2644923) | Cod sursa (job #212184) | Cod sursa (job #106305) | Diferente pentru problema/convertor intre reviziile 32 si 28 | Cod sursa (job #3285826)
#include <fstream>
using namespace std;
ifstream cin("lgput.in");
ofstream cout("lgput.out");
const int MOD=1999999973;
int a,b;
long long exp(long long a, long long b)
{
if(b==1)
return a%MOD;
if(b==0)
return 1;
if(b%2==0)
return exp(a*a%MOD,b/2)%MOD;
return a%MOD*exp(a*a%MOD,b/2)%MOD;
}
int main()
{
cin>>a>>b;
cout<<exp(a,b)%MOD;
return 0;
}