Pagini recente » Cod sursa (job #1560178) | Cod sursa (job #3266887) | Cod sursa (job #2220043) | Cod sursa (job #1582885) | Cod sursa (job #2711969)
#include <iostream>
#include <fstream>
using namespace std;
const int mod = 1999999973;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int lgput(int x, int y) {
int rez = 1;
int exp = x;
while (y) {
if (y & 1)
rez = 1LL * rez * exp, rez %= mod;
exp = 1LL * exp * exp;
exp %= mod;
y >>= 1;
}
return rez;
}
int main() {
int x, y;
cin>>x>>y;
cout<<lgput(x, y);
}