Pagini recente » Cod sursa (job #407319) | Cod sursa (job #279899) | Cod sursa (job #1702869) | Cod sursa (job #1033331) | Cod sursa (job #1383702)
#include <fstream>
using namespace std;
ifstream in ("lgput.in");
ofstream out ("lgput.out");
long long t;
int const M = 1999999973;
int putere(int a, int b)
{
if(b==1)
{
return a;
}
else
{
t=putere(a, b/2);
if(b%2==0)
{
return t*t%M;
}
else
{
return t*t%M*(long long)a%M;
}
}
}
int main()
{
int a, b;
in >> a >> b;
t=putere(a, b);
out << t%M;
return 0;
}