Pagini recente » dedicatie_speciala4 | Cod sursa (job #959266) | Cod sursa (job #2598106) | Cod sursa (job #3190058) | Cod sursa (job #2561555)
#include <fstream>
using namespace std;
int pow(int b, int e) {
if ( e == 1)
return b;
if( e % 2 == 1) {
return b * pow(b * b, (e - 1) / 2);
}
return pow(b * b, e / 2);
}
int main(void) {
ifstream in;
ofstream out;
in.open ("lgput.in");
out.open ("lgput.out");
in.is_open();
int a, b;
in>>a>>b;
out<<pow(a,b) % 1999999973<<"\n";
in.close();
out.close();
return 0;
}