Find the greatest four-digit number which when divided by 20, 30, 35 and 45 leaves remainder 12 in each case.
N mod 20 =12, N mod 30 =12, N mod 35 =12, N mod 45 =12, solve for N
LCM of {20, 30, 35, 45} =1,260
Using Chinese remainder Theorem + Modular Multiplicative Inverse, we get:
N =[7 x 1,260] + 12 =8,832 - The largest 4-digit number.