There are N egg baskets and the number of eggs in each
basket is a known quantity. Two players take turns to remove
these eggs from the baskets. On each turn, a player must
remove at least one egg, and may remove any number of eggs
provided they all belong to the same basket. The player
picking the last egg(s) wins the game. If you are allowed to
decide who is going to start first, what mathematical
function would you use to decide so that you end up on the
winning side?
Answer Posted / khushboo
It is said that there are N egg bags with eggs in it. So
every bag should have eggs..
Now answer depends on Number of Bags containing only one bag
Suppose there is
1. all bag contains more then 1 egg then I will choose first
2. only one bag with one egg then I will choose second
3. Two bags contain one egg I will choose third..
So It depends on how I reach to the last bag in first place
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is the difference between near, far and huge pointers?
How will you find a duplicate number in a array without negating the nos ?
how can use subset in c program and give more example
What is the use of a conditional inclusion statement in C?
What is wrong with this declaration?
i got 75% in all semester am i eligible for your company
What is use of bit field?
What are the key features in c programming language?
Why is event driven programming or procedural programming, better within specific scenario?
How can I call fortran?
What is an array in c?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
Are enumerations really portable?
What is merge sort in c?
Why do we use namespace feature?