Pagini recente » Cod sursa (job #2765401) | Cod sursa (job #1044175) | Cod sursa (job #1679776) | Cod sursa (job #2868897) | Cod sursa (job #2365617)
#include <bits/stdc++.h>
#define modulo 1999999973
using namespace std;
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
int PutLog(int a, int n)
{
long long rez = 1;
while (n != 0)
{
if (n % 2 == 1)
rez = (1LL * rez * a) % modulo;
a = (1LL * a * a) % modulo;
n /= 2;
}
return rez;
}
int main()
{
int baza, putere;
fin >> baza >> putere;
int x = PutLog(baza, putere);
fout << x << "\n";
fin.close();
fout.close();
return 0;
}