Skip to content · ⁨Saltar al contenido⁩

Greatest common divisor · ⁨Máximo común divisor⁩

English

Greatest common divisor

The GCD of two numbers is the largest integer that divides both. Euclid's algorithm is beautifully short: while b isn't 0, replace the pair (a, b) with (b, a % b). When b reaches 0, a is the answer.

Español

Máximo divisor común

El MCD de dos números es el entero más grande que los divide a ambos. El algoritmo de Euclides es bellamente sencillo: mientras b no sea 0, reemplace la pareja (a, b) por (b, a % b). Cuando b llega a 0, a es la respuesta.

Log in or create account · ⁨Iniciar sesión o crear cuenta⁩

IGCSE, A-Level & AP