diff --git a/guide/spanish/algorithms/exponentiation/index.md b/guide/spanish/algorithms/exponentiation/index.md index 92649af1d0..0cb3f42cef 100644 --- a/guide/spanish/algorithms/exponentiation/index.md +++ b/guide/spanish/algorithms/exponentiation/index.md @@ -1,8 +1,8 @@ --- title: Exponentiation -localeTitle: Exposiciónción +localeTitle: Potenciación --- -## Exposiciónción +## Potenciación Dados dos enteros a y n, escribe una función para calcular a ^ n. @@ -38,7 +38,7 @@ int power(int x, unsigned int y) { } ``` -## Exponentiación modular +## modular Dados tres números x, yyp, calculamos (x ^ y)% p @@ -50,7 +50,7 @@ int power(int x, unsigned int y, int p) { if (y & 1) res = (res*x) % p; - // y must be even now + // y debe ser par ahora y = y>>1; x = (x*x) % p; } @@ -58,4 +58,4 @@ int power(int x, unsigned int y, int p) { } ``` -Complejidad del tiempo: O (Log y). \ No newline at end of file +Complejidad del tiempo: O (Log y).