# The A-B chocolate puzzle!

Imagine you have 2 types of chocolates (A and B). You randomly pick up two chocolates at once from your bag in a specific pattern. If the same type of chocolates come out, you give them both to your sister. If you pick up different type of chocolates, you put 'B' type back in your bag and give the 'A' type to your sister. Initially, you have 101 chocolates of 'A' type in the bag. At the end of this chocolate distribution task, you want one chocolate of 'B' for yourself and also one in the bag. Number of 'B' chocolates can be of the form 101*n (where n>100). What is the smallest number 'n' to fulfil this condition?

I have no clue, so any hint will be appreciated

• Hi, and welcome to Puzzling SE! On this site we have an absolute requirement, that if you post a puzzle you didn’t design yourself, you must tell where it’s from and/or who designed it. Thanks, and have fun!
– Bass
Mar 14 '18 at 6:35
• This is a Question from Technothlon mock Mar 14 '18 at 6:45

So it sounds like you want there to be one left in the bag, which is a B chocolate?

In that case,

N=101
You just need to have an odd number of B chocolates, and the smallest N that fulfills that is 101.

Reasoning:

Let's see how this works again
pick AA = lose 2 A from your bag
pick AB/BA = lose 1 A from your bag
pick BB = lose 2 B from your bag

As you can see, you can only lose 2 B chocolates at a time.
Meanwhile, every time you pick an A chocolate, no matter what happens, you'll end up giving that A chocolate to your sister.

Therefore, as long as you have an odd number of B, you'll eventually be left with one B in the bag. A will run out no matter what, and this last B will never be given to your sister because you can only give B chocolates in pairs.