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


Please Help Members By Posting Answers For Below Questions

What is maximum size of array in c?

569


Explain what is meant by high-order and low-order bytes?

624


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

716


Tell me when would you use a pointer to a function?

594


How do you print only part of a string?

600






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...

1479


How can you read a directory in a C program?

639


Define circular linked list.

558


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

1823


Explain b+ tree?

612


Write the test cases for checking a variable having value in range -10.0 to +10.0?

1806


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

3827


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.. :(

1723


What is the difference between union and structure in c?

560


what are bit fields? What is the use of bit fields in a structure declaration?

1487