FYI: If a number is divisible by 9, the sum of all its digit is divisible by 9
If a number is divisible by 4, the last 2 digits is divisible by 4
************************************************************************************************************
Because 56 is divisible by 4, 12ab56 must be divisible by 4 no matter what a and b is.
1 + 2 + a + b + 5 + 6 = 9x
14 + a + b = 9x
9x may be 18 or 27.
Let's first consider the case of 9x = 18.
14 + a + b = 18
a + b = 4 <---- This is easy maths.
a = 1 or b = 3
OR
a = 2 or b = 2
OR
a = 3 or b = 1
3 possibilities of a + b. Then we add them up:
3(a + b)
= 3(4) <---- because each pair of a + b in this consideration adds up to 4.
= 12.
Now consider the case of 9x = 27
14 + a + b = 27
a + b = 13 <----- This is still easy maths.
a = 4 or b = 9
OR
a = 5 or b = 8
OR
a = 6 or b = 7
OR
a = 7 or b = 6
OR
a = 8 or b = 5
OR
a = 9 or b = 4
6 possibilities of a + b. Then add them up again:
6(a + b)
= 6(13)
= 78
Now we add up the number we got in last part and we get in this part.
12 + 78 = 90. Final answer.