I am caught when I was about to steal some candies

I am a eight years old boy, I love candies, but my mom does not want me to eat any more candies because I start to have black teeth :( but I still love candies so...

Today when I was about to steal some candies from our candy box, my mom caught me! but strangely she wants to test my math skill and decided to give me a chance to get as many candies as I want if I win a game she just made up:

There are exactly 66 candies in this box, I will write all numbers from 1 to 66 to your board (1,2,3,4...,66) you will choose a number from the board and take that many candies from the box, but I will wipe that number so you will not able to take that many candies any more from the box. And also I will take candies from you to put back to the box with the left numbers written on the board as you do and wipe that number. then it is your turn etc... We will play this game until no number left on the board or no valid number of candies available to take from any of us (meaning if I have 20 candies, mom cannot try to take 21 candies from me)

If you can take the most candies from me at the end of the game, I will let you have that many candies just for today! otherwise, no candies and to your bed! Come on, tell me your first number!

Help me! I want to eat all candies,

is it possible? if not, how many can I get the most?

For the second case to end the game, I would like to clear with an example:

Let's say there are 50 candies in the candy box (mom's), and you have 16 candies: and somehow only 20,45,55 numbers are left on the board. if it is your mom's turn, she will not able to take any candies from you since the numbers on the board are bigger than the number of candies you have and the game ends there, have fun with your 16 candies :)

• Will mom take the candies from us and put them in the original box? – athin Jun 11 '19 at 12:20
• @athin mom takes that candies back to candy box – Oray Jun 11 '19 at 12:20

Here is one way to win almost all the candies:

Take $$2$$. Mom must now choose $$1$$, as that is the only available number less than or equal to $$2$$. You are left with $$1$$ candy.
Take $$3$$, giving you $$4$$ candies in total. Mom must now take $$4$$, as $$1-3$$ have already been played. You are left with none.

The above sequence eliminates the four lowest numbers from the board. You can however repeat the same procedure with the next four numbers (choose $$6$$, Mom is forced to choose $$5$$, choose $$7$$, Mom must choose $$8$$ leaving you with $$6-5+7-8=0$$).

Repeating this will eliminate all the numbers in sets of $$4$$, so can eliminate everything from $$1$$ to $$64$$, after which you still have no candies.
You final move is then to choose $$65$$. The only number on the board is $$66$$, which cannot be played and the game ends. You then end up with $$65$$ candies.

I think this solution is optimal, in the sense that you cannot end with more candies.

To get all $$66$$ candies, your last move must bring your total to $$66$$. However, as you did the first move and the number of numbers on the board is even, there must be at least one number on the board after your last move. If you had $$66$$ candies, all remaining numbers are valid moves for Mom, so she will be able to make a move and reduce your total. It is therefore impossible to end the game with all $$66$$ candies.

• Beat me by a minute - have the remaining candy as a prize :o) – GeeTee Jun 11 '19 at 12:45
• Sorry @GeeTee. Yum, candy. – Jaap Scherphuis Jun 11 '19 at 13:13