Why this chapter matters. This chapter gave 18 questions in the 6 papers from CDS I 2024 to CDS II 2026, three in a paper on average, and six in CDS I 2026 alone. Five of the 18 are "remainder" word problems: the smallest or greatest number that leaves given remainders. Five use the link between two numbers, their HCF and their LCM. Four use the idea behind Euclid's algorithm: the HCF does not change when one number is replaced by a sum or a difference. Three are practical (the HCF or LCM of decimals, the largest square tile), and one is a statement question on primes. One of the 18 was dropped by UPSC because no option was right.
What you will be able to do
- Find the HCF and LCM of numbers by prime factors, and the HCF of two large numbers by Euclid's algorithm.
- Use โ\text{HCF} \times \text{LCM} = \text{product}โ for two numbers, and write two numbers as โHaโ and โHbโ.
- Find the HCF and LCM of fractions and decimals.
- Read a word problem and decide at once: HCF or LCM, and of which numbers.
Before you start you should know: prime factorisation and co-prime numbers (Chapter A1-3), and the division rule, dividend โ=โ divisor โ\timesโ quotient โ+โ remainder (Chapter A1-4).
1. What HCF and LCM are
The HCF (highest common factor) of two or more numbers is the largest number that divides each of them exactly. It is also called the GCD. The LCM (least common multiple) is the smallest number that each of them divides exactly.
By prime factors. Write each number as a product of prime powers.
- HCF: take only the primes common to all, each with its lowest power.
- LCM: take every prime that appears, each with its highest power.
For โ12 = 2^2 \times 3โ and โ18 = 2 \times 3^2โ: the HCF is โ2 \times 3 = 6โ and the LCM is โ2^2 \times 3^2 = 36โ.
Three facts to keep in mind:
- The HCF is never more than the smallest number. The LCM is never less than the largest.
- The HCF divides the LCM. Every number of the set is a multiple of the HCF and a factor of the LCM.
- If two numbers are co-prime, their HCF is 1 and their LCM is their product. This holds for any two different primes.
2. Euclid's algorithm
Prime factors are slow for large numbers. Euclid's algorithm uses division only.
Method. Divide the larger number by the smaller. Then divide the old divisor by the remainder. Go on until the remainder is 0. The last divisor is the HCF.
For 48 and 18: โ48 = 18 \times 2 + 12โ, then โ18 = 12 \times 1 + 6โ, then โ12 = 6 \times 2 + 0โ. The HCF is 6.
Why it works. A number that divides both โpโ and โqโ also divides โp + qโ, โp - qโ and the remainder when โpโ is divided by โqโ. And a number that divides โqโ and that remainder also divides โpโ. So the common factors do not change at any step:
\text{HCF}(p, q) = \text{HCF}(p, p + q) = \text{HCF}(p, p - q) = \text{HCF}(q, \text{remainder})
Check with 12 and 8, whose HCF is 4: the HCF of 12 and 20 is 4, and the HCF of 12 and 4 is 4.
This idea is asked directly. Two uses:
- Two numbers next to each other are co-prime, because their HCF must divide their difference, 1.
- To show that two expressions are co-prime, combine them so that the letter cancels. If the result is 1 or โ-1โ, the HCF is 1.
3. Two numbers, their HCF and their LCM
For two numbers โxโ and โyโ:
\text{HCF} \times \text{LCM} = x \times y
Check with 12 and 18: โ6 \times 36 = 216 = 12 \times 18โ.
This is not true for three numbers. For 2, 4 and 6 the HCF is 2 and the LCM is 12, which gives 24, but the product is 48.
The form โHaโ, โHbโ. If the HCF of two numbers is โHโ, write them as โHaโ and โHbโ, where โaโ and โbโ are co-prime. Then
\text{LCM} = Hab
Most questions that give a ratio, a sum or an HCF are solved from this form. If two numbers are in the ratio โ3 : 4โ, they are โ3kโ and โ4kโ; since 3 and 4 are co-prime, the HCF is โkโ and the LCM is โ12kโ.
4. Fractions and decimals
For fractions in lowest terms:
| Rule | For โ\dfrac{2}{3}โ and โ\dfrac{4}{9}โ | |
|---|---|---|
| HCF | โ\dfrac{\text{HCF of the numerators}}{\text{LCM of the denominators}}โ | โ\dfrac{2}{9}โ |
| LCM | โ\dfrac{\text{LCM of the numerators}}{\text{HCF of the denominators}}โ | โ\dfrac{4}{3}โ |
Decimals. Give every number the same count of decimal places, drop the points, find the HCF or LCM of the whole numbers, and put the point back. For โ1.8โ and โ4.5โ: work with 18 and 45. Their HCF is 9 and their LCM is 90. So the HCF is โ0.9โ and the LCM is โ9.0โ.
5. Word problems: HCF or LCM?
Words such as "greatest", "largest", "maximum" with "divides" point to the HCF. Words such as "least", "smallest", "together again" with "divisible by" point to the LCM. Call the LCM of the divisors โLโ.
| The question asks for | Find |
|---|---|
| the greatest number that divides โaโ and โbโ exactly; the largest square tile; the greatest speed or longest tape that measures both exactly | HCF of โaโ, โbโ |
| the greatest number that divides โaโ, โbโ, โcโ leaving the same remainder | HCF of the differences โb - aโ, โc - bโ, โc - aโ |
| the greatest number that divides โaโ and โbโ leaving remainders โrโ and โsโ | HCF of โa - rโ and โb - sโ |
| the least number divisible by each of several numbers; when bells ring together again | โLโ |
| a number that leaves the same remainder โrโ with each divisor | โL \times k + rโ |
| a number whose remainders fall short of the divisors by the same amount โdโ | โL \times k - dโ |
In the last two rows โkโ is 1, 2, 3, ... Choose the โkโ that the question needs: the smallest 4-digit number, the largest 5-digit number, a multiple of 11.
How to see the last row. Divisors 6, 12, 15 with remainders 2, 8, 11: each remainder is 4 less than its divisor. So the number is 4 short of a multiple of each divisor. Add 4 to it and it becomes a common multiple.
Worked examples
Example 1. Find the HCF and the LCM of 84 and 360.
โ84 = 2^2 \times 3 \times 7โ and โ360 = 2^3 \times 3^2 \times 5โ. The common primes with their lowest powers give the HCF: โ2^2 \times 3 = 12โ. All the primes with their highest powers give the LCM: โ2^3 \times 3^2 \times 5 \times 7 = 2520โ. Check: โ12 \times 2520 = 30240 = 84 \times 360โ.
Example 2. Find the HCF of 1071 and 462.
โ1071 = 462 \times 2 + 147โ. Then โ462 = 147 \times 3 + 21โ. Then โ147 = 21 \times 7 + 0โ. The last divisor is 21, so the HCF is 21.
Example 3. The HCF of two numbers is 12 and their LCM is 360. One number is 72. Find the other. How many pairs of numbers have this HCF and this LCM?
The other number is โ\dfrac{12 \times 360}{72} = 60โ. For the count, write the numbers as โ12aโ and โ12bโ with โaโ, โbโ co-prime. Then โ12ab = 360โ, so โab = 30โ. The co-prime pairs are 1 and 30, 2 and 15, 3 and 10, 5 and 6. So there are 4 pairs: 12 and 360, 24 and 180, 36 and 120, 60 and 72.
Example 4. (i) Find the smallest 3-digit number that leaves remainder 3 when divided by 8, 12 and 18. (ii) Find the smallest number that leaves remainders 5, 9 and 15 when divided by 8, 12 and 18.
The LCM of 8, 12 and 18 is โ2^3 \times 3^2 = 72โ. (i) The numbers are โ72k + 3โ: 75, 147, ... The smallest with three digits is 147. (ii) Each remainder is 3 short of its divisor: โ8 - 5 = 12 - 9 = 18 - 15 = 3โ. So the number is โ72 - 3 = 69โ. Check: โ69 = 8 \times 8 + 5 = 12 \times 5 + 9 = 18 \times 3 + 15โ.
Example 5. Find the greatest number that divides 77, 147 and 252 leaving the same remainder in each case.
If two numbers leave the same remainder, the divisor divides their difference exactly. The differences are โ147 - 77 = 70โ, โ252 - 147 = 105โ and โ252 - 77 = 175โ. Their HCF is 35. Check: 77, 147 and 252 each leave 7 on division by 35.
From the real papers
The first three questions are from CDS I 2025 and CDS II 2025 (Series A), and the answers agree with the final official key. The next three are from CDS I 2026, where the official key is still provisional; our answers agree with it. Try each for 72 seconds before reading the solution.
CDS II 2025, Q30. A number โNโ is such that when divided by 4, 6, 7 or 9, it leaves 3 as remainder. What is the smallest 4-digit number that satisfies this property?
(a) 1003โโ(b) 1005โโ(c) 1007โโ(d) 1011
Solution. The same remainder each time, so โN = L \times k + 3โ (section 5). The LCM of 4, 6, 7 and 9 is โ2^2 \times 3^2 \times 7 = 252โ. Its multiples are 252, 504, 756, 1008, ... Now โ756 + 3 = 759โ has three digits, and โ1008 + 3 = 1011โ has four. Answer (d).
CDS II 2025, Q15. If โnโ is natural number less than 7, then what is the number of values of โnโ for which โ(12n+2)โ and โ(8n+1)โ are relatively prime?
(a) 6โโ(b) 5โโ(c) 4โโ(d) 3
Solution. Do not test six values. A common factor of the two numbers must divide any combination of them (section 2). Choose the one in which โnโ cancels: โ3(8n + 1) - 2(12n + 2) = 24n + 3 - 24n - 4 = -1โ. So the HCF divides 1, and the two numbers are relatively prime for every โnโ. All six values โn = 1, 2, \dots, 6โ work. Answer (a).
CDS I 2025, Q85. Consider the following statements in respect of prime numbers p and q : I. Their LCM is always an odd number. II. Sum of their LCM and HCF is always an even number. Which of the statements given above is/are correct?
(a) I onlyโโ(b) II onlyโโ(c) Both I and IIโโ(d) Neither I nor II
Solution. Test "always" with the prime 2. Take โp = 2โ and โq = 3โ. They are co-prime, so the HCF is 1 and the LCM is 6. Statement I: 6 is even, so I is not correct. Statement II: โ6 + 1 = 7โ is odd, so II is not correct. Answer (d).
CDS I 2026, Q23. The HCF and LCM of two numbers p and q are 44 and 4620 respectively. When p is divided by 55, the quotient is 4 and remainder is 0. What is the value of q?
(a) 770โโ(b) 924โโ(c) 1155โโ(d) 2310
Solution. First โp = 55 \times 4 + 0 = 220โ. For two numbers, HCF โ\timesโ LCM โ=โ product, so โ220 \times q = 44 \times 4620โ. Cancel before multiplying: โ\dfrac{44}{220} = \dfrac{1}{5}โ, so โq = \dfrac{4620}{5} = 924โ. Answer (b).
CDS I 2026, Q24. Let N be the greatest number that will divide 600, 631 and 724, leaving the same remainder. What is the value of N?
(a) 41โโ(b) 37โโ(c) 33โโ(d) 31
Solution. Take the HCF of the differences (section 5). They are โ631 - 600 = 31โ, โ724 - 631 = 93โ and โ724 - 600 = 124โ. Since โ93 = 3 \times 31โ and โ124 = 4 \times 31โ, the HCF is 31. Each of the three numbers leaves 11 on division by 31. Answer (d).
CDS I 2026, Q79. A Question is given followed by two Statements I and II. Consider the Question and the Statements and mark the correct option.
Question: LCM of three numbers p, q and r โ(p > q > r > 0)โ is 30 and their HCF is 5. What is the product of the three numbers?
Statement-I: p = 15
Statement-II: q = 10
Which one of the following is correct in respect of the above Question and the Statements?
(a) The Question can be answered by using one of the statements alone, but cannot be answered using the other statement aloneโโ(b) The Question can be answered by using either Statement aloneโโ(c) The Question can be answered by using both the Statements together, but cannot be answered using either Statement aloneโโ(d) The Question can be answered even without using both the Statements
Solution. Each number is a multiple of the HCF 5 and a factor of the LCM 30 (section 1). So each is one of 5, 10, 15, 30. Any three of these four have HCF 5 and LCM 30, and the products differ, so the Question alone does not fix the answer. Statement I: the largest is 15, so the numbers are 15, 10, 5 and the product is 750. Enough. Statement II: the middle one is 10, so the numbers are 30, 10, 5 or 15, 10, 5. The products are 1500 and 750. Not enough. One statement alone answers it and the other does not. Notice that the product rule of section 3 cannot be used here, because there are three numbers. Answer (a).
A question from CDS II 2024 (no official key was published; the answer is our own working)
CDS II 2024, Q3. Let โNโ be a 5-digit number. When โNโ is divided by 6, 12, 15, 24 it leaves respectively 2, 8, 11, 20 as remainders. What is the greatest value of โNโ?
(a) 99960โโ(b) 99956โโ(c) 99950โโ(d) 99946
Solution. Each remainder is 4 short of its divisor: โ6 - 2 = 12 - 8 = 15 - 11 = 24 - 20 = 4โ. So โN = L \times k - 4โ. The LCM of 6, 12, 15 and 24 is 120. The largest 5-digit multiple of 120 is โ120 \times 833 = 99960โ. So โN = 99960 - 4 = 99956โ. Answer (b).
Option (a) of the last question is the LCM multiple itself. The paper often lists the number you reach one step before the answer.
Mistakes that cost marks
- Using HCF โ\timesโ LCM โ=โ product for three numbers. It holds for two numbers only. For three, list the possible numbers, as in CDS I 2026 Q79.
- Stopping at the LCM. "Leaves remainder 3" means LCM multiple plus 3. "Remainders 2, 8, 11, 20" means LCM multiple minus 4. Do the last step.
- Taking the HCF of the numbers when the remainders are equal. For "leaving the same remainder", take the HCF of the differences.
- Mixing up lowest and highest powers. HCF: common primes, lowest powers. LCM: all primes, highest powers. A quick test: the HCF must divide each number, and each number must divide the LCM.
Quick check
Do these without help. Answers are at the end.
- Find the HCF and the LCM of 36 and 120.
- The HCF of two numbers is 15 and their product is 4500. Find their LCM.
- Find the least number that leaves remainder 2 when divided by 5, 6 and 8.
- Find the greatest number that divides 62 and 90 leaving remainder 6 in each case.
- Find the LCM of โ0.6โ, โ1.5โ and โ2.4โ.
Read and watch more, free
| What | Where | Language |
|---|---|---|
| Textbook, HCF and LCM from the start | NCERT Class 7 Ganita Prakash Part II, Chapter 3 Finding Common Ground ยท Hindi edition | English, Hindi |
| Textbook, Euclid's algorithm | NCERT Class 9 Ganita Manjari Part II, Chapter 11 The World of Algorithms, section 11.2 Greatest Common Divisor (the Hindi edition of this part is not yet published) | English |
| Textbook, HCF and LCM by prime factors | NCERT Class 10 Mathematics, Chapter 1 Real Numbers ยท Hindi edition | English, Hindi |
| Lessons with practice | Khan Academy: NCERT Math Class 10 (the unit on real numbers) ยท in Hindi | English, Hindi |
| Practice with answers | NCERT Exemplar Class 10, Unit 1 Real Numbers ยท Hindi edition | English, Hindi |
| The real papers | UPSC previous question papers | English, Hindi |
| Video, a full CDS course | R.S SIR: Maths Playlist for CDS 2025 (the LCM and HCF lessons, about 55 minutes each) | Hindi and Hinglish |
| Video, in Hindi | Rojgar with Ankit Defence: CDS 01 2025, Maths By Neeraj Baisla Sir (the eight LCM and HCF lessons) | Hindi |
| Video, one lesson with past questions | The Journey Extraordinary: Maths For CDS 2 2026 (the LCM and HCF lesson) | Hinglish |
The videos were chosen from their titles, length and views; they have not yet been watched by a teacher.
Answers to the quick check
- โ36 = 2^2 \times 3^2โ and โ120 = 2^3 \times 3 \times 5โ. HCF โ= 2^2 \times 3 = 12โ; LCM โ= 2^3 \times 3^2 \times 5 = 360โ.
- LCM โ= \dfrac{4500}{15} = 300โ.
- The LCM of 5, 6 and 8 is 120, so the number is โ120 + 2 = 122โ.
- Take away the remainder: 56 and 84. Their HCF is 28.
- Work with 6, 15 and 24. Their LCM is 120, so the answer is โ12.0 = 12โ.
Next chapter: Logarithms to base 10.