Pagini recente » Cod sursa (job #2151230) | Cod sursa (job #2731462) | Cod sursa (job #2060856) | Diferente pentru sandbox intre reviziile 406 si 405 | Cod sursa (job #1723661)
#include <fstream>
#define ll long long
#define M 1999999973
using namespace std;
ll power(ll n, ll p) {
if(p==0)
return 1;
if (p==1)
return n;
ll pow=(power(n,p/2));
if(p%2==0)
return (pow*pow)%M;
else
return ((((pow*pow)%M)*n)%M);
}
int main()
{
ifstream fin("lgput.in");
ofstream fout("lgput.out");
ll n,p;
fin>>n>>p;
fout<<power(n,p);
return 0;
}