For some four-digit numbers, the hundreds digit is 3 and the tens digit is 6, and they are divisible by both 2 and 3. If A is the largest of these four digits and B is the smallest, what is the sum of the thousands digit and the ones digit (four digits in total) of the two digits of A and B?
一些四位数，百位数字都是3，十位数字都是6，并且他们既能被2整除又能被3整除．甲是这样四位数中最大的，乙是最小的，则甲乙两数的千位数字和个位数字(共四个数字)的总和是多少．
<gadget id="calculator">9 + 1 + 6 + 2</gadget>
<output>18</output>

<result>18</result>