Pagini recente » Cod sursa (job #724560) | Cod sursa (job #1233605) | Cod sursa (job #2463029) | Cod sursa (job #2710115) | Cod sursa (job #3241998)
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define all(a) (a).begin(),(a).end()
using namespace std;
const int maxn=1e5+5;
const ll mod = 1999999973;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
ll pw(ll n, ll exp) {
if (exp == 0) {
return 1;
}
if (exp == 1) {
return n;
}
if (exp % 2 == 0) {
return pw(n, exp / 2) * pw(n, exp / 2) % mod;
}
else {
return pw(n, exp / 2 + 1) * pw(n, exp / 2) % mod;
}
}
void solve() {
ll n, exp;
fin >> n >> exp;
fout << pw(n, exp) % mod << endl;
}
int main() {
int t = 1;
//cin >> t;
while (t--) {
solve();
}
}