Pagini recente » Cod sursa (job #2052177) | Cod sursa (job #3123599) | Cod sursa (job #649204) | Cod sursa (job #2561804) | Cod sursa (job #2238410)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long n, p, mod = 1999999973;
long long putere_logaritmic(int n, int p)
{
if (p == 0) return 1;
long long x = putere_logaritmic(n, p / 2);
x = (x * x) % mod;
if (p % 2 == 1) x = (x * n) % mod;
return x;
}
int main()
{
fin >> n >> p;
fout << putere_logaritmic(n, p);
return 0;
}