Pagini recente » Cod sursa (job #2053257) | Cod sursa (job #2226858) | Cod sursa (job #1386990) | Cod sursa (job #1888002) | Cod sursa (job #2636619)
#include <iostream>
#include <cmath>
#include <fstream>
#define mod 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int n;
long long a, b, rez;
int putere() {
rez = 1;
while (b > 0) {
if (b % 2 != 0)
rez = rez * a % mod;
a = a * a % mod;
b /= 2;
}
return rez;
}
int main() {
fin >> a >> b;
fout << putere() << "\n";
return 0;
}