Pagini recente » Cod sursa (job #2642839) | Cod sursa (job #1933041) | Cod sursa (job #628451) | Cod sursa (job #2400455) | Cod sursa (job #2178204)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 1999999973
ll a,b;
ll lgput(ll x, ll y){
if (y == 1) return x%MOD;
if (y & 1) return ((x%MOD) * lgput((x*x)%MOD, y/2))%MOD;
else return lgput((x*x)%MOD, y/2)%MOD;
}
/*ll lgput(ll n,ll p){
if (p==1) return n;
if (p%2==0) return lgput((n*n)%MOD,p/2)%MOD;
else return (n*lgput((n*n)%MOD,p/2))%MOD;
}*/
int main(){
ifstream cin ("lgput.in");
ofstream cout ("lgput.out");
cin >> a >> b;
cout << lgput(a, b);
return 0;
}