Pagini recente » Diferente pentru problema/tequila intre reviziile 137 si 136 | Cod sursa (job #1815699) | Cod sursa (job #1799333) | Cod sursa (job #1672460) | Cod sursa (job #2855570)
#include <fstream>
#define mod 1999999973
using namespace std;
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
int Pow(int x, int y)
{
if (y==0) return 1;
if (y==1) return x%mod;
int p=Pow(x, y/2);
if (y%2==0) return (1LL*p*p)%mod;
else return ((1LL*p*p)%mod*x)%mod;
}
int main()
{
int n, p;
fin>>n>>p;
fout<<Pow(n, p);
return 0;
}