Pagini recente » Borderou de evaluare (job #1362667) | Borderou de evaluare (job #202992) | Borderou de evaluare (job #1918615) | Borderou de evaluare (job #2573107) | Cod sursa (job #1970464)
#include <bits/stdc++.h>
using namespace std;
#define FILE_IO
const int mod = 1999999973;
int power(int x, int y)
{
if(y == 0) return 1;
if(y == 1) return x;
int ans = power( (1LL * x * x) % mod, y / 2 );
if(y & 1) ans = (1LL * ans * x) % mod;
return ans;
}
int main()
{
#ifdef FILE_IO
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
#endif
int N, M;
cin >> N >> M;
cout << power(N, M);
return 0;
}