Pagini recente » Cod sursa (job #1905926) | Cod sursa (job #737721) | Cod sursa (job #2040015) | Cod sursa (job #2988693) | Cod sursa (job #2526099)
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll a, b;
ll mod=1999999973;
ll putere(ll x, ll n ){
if(n==0)
return 1;
if(n==1)
return x%mod;
if(n%2==0)
return ((putere(x,n/2)*putere(x,n/2))%mod);
return ((x*putere(x,(n-1)/2)*putere(x,(n-1)/2))%mod);
}
int main() {
ifstream fin("lgput.in");
ofstream fout("lgput.out");
fin >> a >> b;
fout<<putere(a, b);
return 0;
}