Pagini recente » Cod sursa (job #1361898) | Cod sursa (job #1639692) | Cod sursa (job #1745009) | Cod sursa (job #1133957) | Cod sursa (job #3205260)
#include <iostream>
#include <fstream>
typedef long long LL;
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
const int MOD = 1999999973;
LL n, p;
LL pow(LL n, LL p){
LL rez = 1, f = n;
while(p){
if(p % 2 == 1)
rez = (rez * f) % MOD;
f = (f * f) % MOD;
p >>= 1;
}
return rez;
}
int main()
{
f >> n >> p;
g << pow(n, p);
return 0;
}