Pagini recente » Cod sursa (job #2580626) | Cod sursa (job #1662605) | Diferente pentru problema/expresie3 intre reviziile 2 si 11 | Cod sursa (job #1588221) | Cod sursa (job #2471299)
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int64_t n,p;
const int64_t MOD=1999999973;
int64_t powmodulo ()
{
int64_t b=1;
while (p)
{
if ((p&1))
{
b=((b%MOD)*(n%MOD))%MOD;
p--;
}
n=((n%MOD)*(n%MOD))%MOD;
p=(p>>1);
}
return b;
}
int main ()
{
f>>n>>p;
g<<powmodulo();
return 0;
}