Pagini recente » Diferente pentru problema/anarhie intre reviziile 2 si 3 | Cod sursa (job #1596768) | Cod sursa (job #534959) | Monitorul de evaluare | Cod sursa (job #613890)
Cod sursa(job #613890)
#include <cstdio>
long pow(int a, int b)
{
if ( b == 0 ) return 1;
if ( b%2 == 0 )
return pow(a*a, b/2);
else
return a*pow(a*a, b/2);
}
int main()
{
int x, y;
long r;
// freopen("lgput.in", "r", stdin);
// freopen("lgput.out", "w", stdout);
scanf("%d%d", &x, &y);
r = pow(x, y);
printf("%d", r%1999999973);
}