Pagini recente » Rating Anda Nicolae (Poisoned_Ivy) | Cod sursa (job #1680503) | Cod sursa (job #943344) | Cod sursa (job #1469957) | Cod sursa (job #3184489)
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
ll a,b,i,j,sol,mod=1999999973,x;
ll LogPower(ll b,ll p){
if (p == 0)
return 1;
x = LogPower(b,p/2)%mod;
if (p % 2 == 0)
return (x*x)%mod;
else
return (b*(x*x)%mod)%mod;
}
int main()
{
fin >> a >> b;
fout << LogPower(a,b);
return 0;
}