Problem Statement
Find the least number which when divided by 12, 18 and 21 leaves a remainder 7 in each case.
Explanation
If N leaves remainder 7 with all, then N−7 is divisible by LCM(12,18,21). LCM = 2²×3²×7 = 252.
Least N = 252 + 7 = 259.
Code Solution
SolutionRead Only
LCM = 252; N ≡ 7 ⇒ N = 252k+7 → k=1 ⇒ 259
