Pagini recente » Cod sursa (job #2350018) | Cod sursa (job #2538979) | Cod sursa (job #2529318) | Cod sursa (job #281320) | 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;
}