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