ГХДХ ба ЛХХ тооцоолуур
Find the greatest common divisor and least common multiple of a list of numbers.
Тоо бичсэнээр үр дүнг шинэчилнэ.
Энэ калькуляторын тухай
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 ба LCM-ийн хооронд ямар холбоо байдаг вэ?
Хоёр тооны хувьд, GCD × LCM = тооны үржүүлэг. LCM = a × b ÷ GCD, энэ нь LCM-ийг бүхэл жагсаалтад хэрхэн өргөтгөх вэ.
Coprime гэж юу вэ?
Хоёр эсвэл түүнээс олон тооны хамгийн том нийт хуваагч нь 1 бол тэд нэгдмэл тоо юм. Тэд 1-ээс өөр нийт хүчин зүйлгүй. Энэ хэрэгслээс энэ мэдээллийг харуулна.
Би хоёроос илүү тоо оруулах боломжтой юу?
Тийм ээ. Бүх тоог цэг эсвэл зайгаар зааглавал GCD болон LCM- ийг бүх жагсаалтаас тооцно.
12, 18, 24- ийн хамгийн том нийт, хамгийн бага нийт нь юу вэ?
Хамгийн том нийт хуваагч нь 6(3-ыг хуваах хамгийн том тоо) ба хамгийн бага нийт олон нь 72.
Тоонууд ямар эрэмбэтэй байх нь чухал уу?
Үгүй. ГЗХ болон ГЗХ- ийн аль нь ч тоог ямар дэс дараалалтай бичсэнээс үл хамааран ижил байдаг.
API - энэ калькуляторыг кодоос ашиглах
Энэ тооцоологчийг JSON- ийн төгсгөлийн цэгийн хувьд дуудна. Товч хэрэггүй. Доорх талбарын утгауудыг асуултын параметр эсвэл JSON- оор илгээнэ үү. Та юу ч хассан бай, энэ хуудсанд заасан стандарт параметрийг ашиглана. Тодорхойгүй параметр нь 400, хэзээ ч нууц нугалбар биш. Бүх 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);
Энэ нь зөвхөн ерөнхий зөвлөгөөний дүн шинжилгээ бөгөөд санхүү, эмнэлгийн болон татварын зөвлөгөө биш юм.