Pagini recente » Cod sursa (job #780383) | Cod sursa (job #993935) | Diferente pentru utilizator/vladdobro07 intre reviziile 28 si 29 | Cod sursa (job #1005919) | Cod sursa (job #2873330)
#include <iostream>
#include <fstream>
#define MOD 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long putere(long long a, long long b)
{
long long p=1%MOD;
do
{
if(b%2==1)
p*=a%MOD;
b/=2;
a%=MOD;
a*=a%MOD;
}while(b!=0);
return p;
}
int main()
{
long long a,b;
fin>>a>>b;
fout<<putere(a,b);
return 0;
}