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 function prototype in c language?
What is the difference between call by value and call by reference in c?
How can a string be converted to a number?
Is fortran faster than c?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
What is the use of sizeof?
What is c language used for?
How can I dynamically allocate arrays?
What is a c token and types of c tokens?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Differentiate between the expression “++a” and “a++”?
Explain the array representation of a binary tree in C.
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
Is it possible to initialize a variable at the time it was declared?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent