GCD & LCM 계산기

숫자 목록의 최대 공통 분모와 최소 공통 배수를 찾습니다.

정수는 쉼표나 공백으로 구분합니다.
최대 공집합(GCD) —
최소 공집합(LCM) —
커버? —

입력하는 동안 결과가 업데이트됩니다.

이 계산기가 올바른 답을 드렸습니까?

이 계산기에 대해

This calculator finds the greatest common divisor (GCD) — the largest number that divides all your values evenly — and the least common multiple (LCM), the smallest number they all divide into. Enter two or more whole numbers separated by commas or spaces and it also tells you whether they are coprime.

The GCD is found with the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing the two until one becomes zero; the other is the GCD. The LCM is then built up pairwise using LCM = a × b ÷ GCD. For 12, 18 and 24 the greatest common divisor is 6 and the least common multiple is 72. When the GCD is 1 the numbers share no common factor and are called coprime.

The GCD is what you use to reduce a fraction to lowest terms, while the LCM gives the common denominator for adding fractions and the period at which repeating cycles line up. The result is the same no matter what order you enter the numbers in.

자주 묻는 질문

GCD는 어떻게 계산되는가?

이것은 유클리드 알고리즘을 사용합니다: 하나가 0이 될 때까지 두 개를 나눈 나머지로 큰 숫자를 반복적으로 대체합니다. 다른 하나는 GCD입니다.

GCD와 LCM은 어떻게 관련이 있습니까?

두 개의 숫자에 대해 GCD × LCM = 숫자의 곱입니다. 따라서 LCM = a × b ÷ GCD 입니다. 이 도구는 전체 목록에 걸쳐 LCM을 확장합니다.

코프라임이란 무엇을 의미합니까?

두 개 이상의 숫자가 공소수인 경우 그들의 최대 공분수는 1이며, 1 이외의 공통 분모를 공유하지 않습니다. 도구는 이것을 플래그로 표시합니다.

두 개 이상의 번호를 입력할 수 있습니까?

정수를 쉼표나 공백으로 구분하면 GCD와 LCM이 전체 목록에서 계산됩니다.

12, 18 및 24의 GCD 및 LCM은 무엇입니까?

가장 큰 공통분모는 6이며, 가장 작은 공통분모는 72이다.

숫자의 순서가 중요합니까?

2017년 12월 1일

❤️ 사랑 Calculator.Free? 공유하세요

𝕏  X Facebook Reddit
API — 코드에서 이 계산기를 사용

이 계산기를 무료 JSON 엔드포인트로 호출하세요. 키가 필요하지 않습니다. 아래 필드 값을 쿼리 매개 변수 또는 JSON으로 보내십시오. 누락된 모든 값은 이 페이지에서 미리 채워진 기본값을 사용합니다. 알 수 없는 매개변수는 400이며, 절대 0이 아닙니다. 전체 API 문서 읽기 →

끝점

GET https://calculator.free/api/v1/gcd-lcm/

curl

curl "https://calculator.free/api/v1/gcd-lcm/?numbers=12, 18, 24"

JavaScript fetch()

const r = await fetch(
  "https://calculator.free/api/v1/gcd-lcm/?" + new URLSearchParams({
    "numbers": "12, 18, 24"
  }));
const data = await r.json();
console.log(data.results);

결과는 재정, 의료 또는 세금 조언이 아닌 일반적인 지침을위한 추정치입니다.