Pagini recente » Cod sursa (job #1540773) | Cod sursa (job #1672907) | Cod sursa (job #2647691) | Cod sursa (job #1647003) | 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;
}