Pagini recente » Cod sursa (job #1656199) | Cod sursa (job #775741) | Cod sursa (job #812430) | Cod sursa (job #953656) | Cod sursa (job #1359869)
#include <fstream>
#define MOD 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int n,p;
long long Sol=1;
void citeste()
{
fin>>n>>p;
}
void solutie()
{
while(p)
{
if(p%2==1)
Sol = (Sol * n) % MOD;
n = (n * n)%MOD;
p = p/2;
}
}
void afiseaza()
{
fout<<Sol<<"\n";
}
int main()
{
citeste();
solutie();
afiseaza();
return 0;
}