Pagini recente » Diferente pentru problema/joc19 intre reviziile 9 si 2 | Cod sursa (job #3176916) | Cod sursa (job #1763905) | Cod sursa (job #2542545) | Cod sursa (job #3283524)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int p;
int Mod=1999999973;
long long n;
inline long long putere(long long a,int e)
{
long long rez=1;
while (e)
{
if (e&1)
{
rez=rez*a;
rez%=Mod;
}
a=a*a;
a%=Mod;
e=(e>>1);
}
return rez;
}
int main()
{
fin>>n>>p;
fout<<putere(n,p);
return 0;
}