Pagini recente » Borderou de evaluare (job #1994395) | Statistici Ventuneac Andrei (andreiventu) | Borderou de evaluare (job #2028269) | Borderou de evaluare (job #1256939) | Cod sursa (job #3132870)
#include <bits/stdc++.h>
using namespace std;
#define MOD 1999999973
ifstream in("lgput.in");
ofstream out("lgput.out");
int exp_log(int x, int n)
{
if(n == 0) return 1;
if(n%2) return x*exp_log(x*x, n/2);
return exp_log(x*x, n/2);
}
int main()
{
int n, p;
in >> n >> p;
out << exp_log(n, p) %MOD;
return 0;
}