Interview Q&A / Aptitude

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is the least number which, when divided by 12, 15, 20 and 54, leaves a remainder of 8 in each case?

SHORT ANSWER

548. The number minus 8 must be a multiple of all four divisors. LCM(12, 15, 20, 54) = 540, so the least such number is 540 + 8 = 548.

Explain it simply

If you pack a box of laddoos into rows of 12, 15, 20 or 54 and every time exactly 8 are left over, then removing those 8 leaves a pile that fits every row size perfectly. The smallest pile that fits all row sizes is the LCM. Add the 8 back and you have the answer.

Example

Question: Least number that leaves remainder 8 when divided by 12, 15, 20 and 54.

  1. Factorise: 12 = 2^2 x 3, 15 = 3 x 5, 20 = 2^2 x 5, 54 = 2 x 3^3.
  2. LCM = 2^2 x 3^3 x 5 = 4 x 27 x 5 = 540.
  3. Answer = 540 + 8 = 548.

Check: 548 = 12 x 45 + 8 = 15 x 36 + 8 = 20 x 27 + 8 = 54 x 10 + 8.

js
console.log([12, 15, 20, 54].map(d => 548 % d)); // Output: [8,8,8,8]

A variation: if the remainders differ but each is the same amount short of its divisor (for example 12 leaves 4, 15 leaves 7), the number is LCM minus that shortfall, here 540 - 8 = 532.

What to say in the interview

"Same remainder for every divisor means the number is LCM plus that remainder. The LCM of 12, 15, 20 and 54 is 540, so the least number is 548."

Common mistakes

  • Taking HCF instead of LCM.
  • Taking the highest power of only some primes; 54 brings 3^3, which is easy to miss.

#aptitude#hcf-lcm

Related questions

Practise more Aptitude questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Aptitude quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.