Pagini recente » Cod sursa (job #2340247) | Cod sursa (job #1829050) | Cod sursa (job #2282610) | Cod sursa (job #2457211) | 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;
}