The sum of the two numbers A and B is 40, and the number A is three times that of B, find the greatest common factor of the two numbers A and B.
甲、乙两数的和是40，且甲数是乙的3倍，求甲、乙两数的最大公因数．
<gadget id="calculator">3 + 1</gadget>
<output>4</output>

<gadget id="calculator">40 / 4</gadget>
<output>10</output>

<result>10</result>