Skip to content · ⁨본문 바로가기⁩

Greatest common 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.

한국어

최대공약수(greatest common divisor)

두 수의 최대공약수(GCD)는 두 수를 모두 나눌 수 있는 가장 큰 정수입니다. 유클리드 알고리즘은 매우 간결합니다: b이 0이 아닐 때, 쌍 (a, b)을 (b, a % b)로 교체합니다. b이 0이 되면, a이 정답입니다.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP