The five-digit number $9 A 65 B$ is divisible by 36 , where $A$ and $B$ are digits. Find all possible values of $A$ and $B$.
A number is divisible by 36 iff it is divisible by 9 and 4 . For it to be divisible by 4 , the last two digits must make a 2 -digit number divisible by 4 , and the only possibilities for this are $B=2$ or $B=6$. For it to be divisible by 9 , the sum of the digits must be a multiple of 9 . Right now the sum is $9+6+5=20$, and the next multiple of 9 is 27 , so we need $A+B=7$. Thus, the two solutions are $A=5, B=2$ or $A=1, B=6$.