Pagini recente » Cod sursa (job #2598582) | Cod sursa (job #960162) | Cod sursa (job #2745183) | Cod sursa (job #890230) | Cod sursa (job #1354257)
#include <stdio.h>
using namespace std;
int putere(int a, int b){
if(b==0) return 1;
if(b==1) return a;
else{
if(b%2==0) return (long long)putere(a,b/2)*putere(a,b/2)%1999999973;
else return a*(long long)putere(a,b/2)*putere(a,b/2)%1999999973;
}
}
int main()
{
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
int a,b;
scanf("%d %d", &a, &b);
printf("%d",putere(a,b));
return 0;
}