Pagini recente » Cod sursa (job #783802) | Cod sursa (job #2353992) | Cod sursa (job #3132362) | Cod sursa (job #1964993) | Cod sursa (job #2987426)
#include <bits/stdc++.h>
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
int put(unsigned long long a, unsigned long long b){
if(b==0){
return 1;
} else if (b==1){
return a;
} else if(b%2==1){
return a*put(a*a, (b-1)/2);
} else if (b%2==0){
return put(a*a, b/2);
}
}
int main()
{
unsigned long long x,y,z;
in >> x >> y;
out << put(x, y) % 1999999973;
}