Skip to content · ⁨Passer au contenu⁩

Greatest common divisor · ⁨Plus grand commun diviseur⁩

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.

Français

Plus grand commun diviseur

Le PGCD de deux nombres est le plus grand entier qui les divise tous deux. L'algorithme d'Euclide est magnifiquement court : tant que b n'est pas 0, remplacez la paire (a, b) par (b, a % b). Quand b atteint 0, a est la réponse.

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP