Pagini recente » Cod sursa (job #672342) | Cod sursa (job #2562112) | Cod sursa (job #1985124) | Cod sursa (job #2987596) | Cod sursa (job #1129240)
#include <iostream>
#include <fstream>
#define mod 1999999973
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
int pow(int a, int b){
if (b==1) return a;
else {
if (b%2==0)
return (pow(a, b/2)%mod)*(pow(a,b/2)%mod)%mod;
else return (((pow(a, b/2)%mod)*(pow(a,b/2)%mod)%mod)*(a%mod))%mod;
}
}
int main(){
int x,y;
in >> x >> y;
out << pow(x, y);
return 0;
}