Pagini recente » Cod sursa (job #921641) | Statistici Muresanu Gabriel Ionut (ionut2219) | Cod sursa (job #916282) | Cod sursa (job #286960) | Cod sursa (job #968427)
Cod sursa(job #968427)
#include <iostream>
#include <fstream>
#define MOD 1999999973
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int n,p;
int powmodulo ()
{
int 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();
}