Pagini recente » Istoria paginii runda/cerculdeinfo-lectia1-hashuri.rabinkarp | Statistici Pascale Robert (tonica1) | Cod sursa (job #2201175) | Monitorul de evaluare | Cod sursa (job #2879856)
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1999999973;
long long putere(long long n, long long e) {
int rez = 1;
while (e) {
if (e % 2 == 1) {
rez = (rez * n) % mod;
}
n = (n * n) % mod;
e = e / 2;
}
return rez;
}
int main() {
ifstream in("lgput.in");
ofstream out("lgput.out");
long long n, e;
in >> n >> e;
out << putere(n , e);
return 0;
}