Pagini recente » Cod sursa (job #812107) | Cod sursa (job #878473) | Cod sursa (job #812105) | Cod sursa (job #826479) | Cod sursa (job #2250790)
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
const int mod = 1999999973;
long long base, Exp;
int Power(long long base, long long Exp)
{
int ans = 1, aux = base;
for(int i = 1; i <= Exp; i <<= 1)
{
if(i & Exp)
ans = ans * aux % mod;
aux = aux * aux % mod;
}
return ans;
}
int main()
{
f >> base >> Exp;
g << Power(base, Exp);
return 0;
}