Pagini recente » Cod sursa (job #1312339) | Cod sursa (job #2048244) | Cod sursa (job #2894674) | Cod sursa (job #2747904) | Cod sursa (job #3355094)
#include<iostream>
#include<fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int lg_put(int a, int b) {
int rez = 1;
while(b > 0) {
if(b % 2 == 1) {
rez = 1LL * rez * a % 1999999973;
}
a = 1LL * a * a % 1999999973;
b /= 2;
}
return rez;
}
int main(){
int a,b;
fin>>a>>b;
int rez = lg_put(a,b);
fout<<rez;
return 0;
}