/CHD2J

"Brotherhood" competition from codefun

CHD2J

"Brotherhood" competition from codefun

From QĐ's 10th grade summer, he has obtained "Nhất Dương Chỉ", making his name in martial arts land.

A newbie, TD, has done some investigation about QĐ, and decided to become his fan and indoctrinate Nhất Dương Chỉ.

Nhất Dương Chỉ has two levels of proficiency, of which the highly skilled users must pierce through a steel chair with his own finger.

DT had planned to sell some gloves for those that want to master Nhất Dương Chỉ in incoming winter. He have some gloves to spare, placed in bags: X for black ones, Y for brown ones, Z for grey one. If you are a buyer, you can only inspect the glove one time after picking it. Also, the room for the purchases is dark.

How many times at least for us buyers must buy to meet one of these condition: A) Have 2 pairs of the same color B) Have all of the colors

Spec: Multiple test: X Y Z and a symbol A or B

Input: 3 4 5 A Output: 4