Pagini recente » Cod sursa (job #1797651) | Cod sursa (job #2567266) | Cod sursa (job #2700335) | Cod sursa (job #1339758) | Cod sursa (job #1913123)
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
const int mod = 1999999973;
inline int Put(long long x, long long y) {
int p = 1;
while(y) {
if(y & 1) {
p = (1LL* p * x) % mod;
y--;
}
x = (1LL * x * x) % mod;
y = y / 2;
}
return p;
}
int main()
{
long long x, n;
f >> x >> n;
g << Put(x, n) << "\n";
return 0;
}