Pagini recente » Cod sursa (job #1731352) | Cod sursa (job #3138981) | Cod sursa (job #772733) | Cod sursa (job #3127024) | Cod sursa (job #2711967)
#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;
fin>>x>>y;
fout<<lgput(x, y);
}