Pagini recente » Cod sursa (job #591444) | Cod sursa (job #1187444) | Cod sursa (job #1521290) | Cod sursa (job #1863946) | Cod sursa (job #2865746)
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
ifstream fin("date.in");
ofstream fout("date.out");
typedef long long ll;
const int NMAX = 100005;
const ll MOD = 1999999973;
ll a, b;
ll lgput(ll n, ll p)
{
ll sol = 1;
ll a = n;
for (ll i = 0ll; (1ll << i) < p; i++)
{
if ((1ll << i) & p)
sol = (sol * a) % MOD;
a = (a * a) % MOD;
}
return sol;
}
void read()
{
fin >> a >> b;
}
void solve()
{
fout << lgput(a, b) << '\n';
}
int main()
{
read();
solve();
return 0;
}