Pagini recente » Cod sursa (job #2655699) | Cod sursa (job #2344013) | Profil pestcontrol874 | Diferente pentru sandbox intre reviziile 309 si 308 | Cod sursa (job #1715116)
#include <bits/stdc++.h>
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
int a,b;
long long f (long long n, long long p)
{
long long aux = 1;
while(p != 0) {
if(p % 2 == 1) aux = (aux * n) % 1999999973;
n = (n * n) % 1999999973;
p /= 2;
}
return aux;
}
int main()
{
long long n, p;
in >> n >> p;
out << f (n, p);
return 0;
}