Pagini recente » Cod sursa (job #1390598) | Cod sursa (job #345990) | Cod sursa (job #1249138) | Cod sursa (job #2225480) | Cod sursa (job #1354265)
#include <stdio.h>
using namespace std;
int putere(int a, int b){
if(b==0) return 1;
if(b==1) return a;
long long x=putere((long long)a*a%1999999973,b/2);
if(b%2==0) return x;
else return (long long)a*x%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)%1999999973);
return 0;
}