Pagini recente » Cod sursa (job #594471) | Cod sursa (job #2065038) | Cod sursa (job #129021) | Cod sursa (job #126872) | Cod sursa (job #1223957)
#include <fstream>
#include <cmath>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const long long MOD = 1999999973;
long long a, b;
void Putere();
int main()
{
fin >> a >> b;
Putere();
fin.close();
fout.close();
return 0;
}
void Putere()
{
long long p = 1;
while ( b > 0 )
{
if ( b % 2 )
{
p *= a;
p %= MOD;
}
a = a * a;
a %= MOD;
b /= 2;
}
p %= MOD;
fout << p << '\n';
}