מחשבון 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 מחושב?
הוא משתמש באלגוריתם אוקלידי: מחליף שוב ושוב את המספר הגדול יותר בשאר חלקי השניים, עד שאחד הופך לאפס. השני הוא GCD.
איך GCD וLCM קשורים?
For two numbers, GCD × LCM = the product of the numbers. So LCM = a × b ÷ GCD, which is how the tool extends the LCM across a whole list.
מה המשמעות של "קופריים"?
Two or more numbers are coprime when their greatest common divisor is 1 — they share no common factor other than 1. The tool flags this for you.
אני יכול להכניס יותר משני מספרים?
כן, הפרד מספרים שלמים עם פסיקים או רווחים, וה-GCD ו-LCM מחושבים לאורך כל הרשימה.
מהו GCD וLCM של 12, 18 ו-24?
המחלק המשותף הגדול ביותר הוא 6 (המספר הגדול ביותר המפריד בין כל השלושה) והמספר הנפוץ ביותר הוא 72.
האם סדר המספרים משנה?
מס 'גם GCD וגם את LCM הם אותו הדבר ללא קשר לסדר אתה להקליד את המספרים.
API — use this calculator from code
Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or 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);
התוצאות הן הערכות להדרכה כללית בלבד, לא ייעוץ כספי, רפואי או מס.