Pagini recente » Cod sursa (job #2493748) | Cod sursa (job #1757057) | Cod sursa (job #2153916) | Cod sursa (job #3210332) | Cod sursa (job #2763375)
#include <iostream>
#include <fstream>
#define Mod 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
void LOG(int a, int b)
{
long long res = 1;
if(b == 0)
fout << 1;
if(b == 1)
fout << a;
while(b > 1)
{
if(b % 2 == 1)
res = (res * a) % Mod;
b /= 2;
a = a * a;
}
fout << (res * a) % Mod;
}
int main()
{
int baza, exp;
fin >> baza >> exp;
LOG(baza, exp);
return 0;
}