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 maximum size of array in c?
Explain what is meant by high-order and low-order bytes?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Tell me when would you use a pointer to a function?
How do you print only part of a string?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
How can you read a directory in a C program?
Define circular linked list.
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
Explain b+ tree?
Write the test cases for checking a variable having value in range -10.0 to +10.0?
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
What is the difference between union and structure in c?
what are bit fields? What is the use of bit fields in a structure declaration?