Pagini recente » Cod sursa (job #2033726) | Cod sursa (job #2035513) | Cod sursa (job #2228445) | Cod sursa (job #767467) | Cod sursa (job #2029101)
#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
const int NMax = 1e3 + 5;
const int inf = 1e9 + 5;
const int mod = 1999999973;
using zint = short;
ll N,P;
ll pw(ll,ll);
int main() {
in>>N>>P;
out<<pw(N,P)<<'\n';
in.close();out.close();
return 0;
}
ll pw(ll base,ll exp) {
ll ans = 1;
while (exp) {
if (exp & 1) {
ans = (ans * base) % mod;
}
base = (base * base) % mod;
exp >>= 1;
}
return ans;
}