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 / guest

n-1 if n is odd and n+1 if n is even

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are structures and unions? State differencves between them.

610


How do you determine the length of a string value that was stored in a variable?

647


What does p mean in physics?

579


Can a void pointer point to a function?

565


Explain bitwise shift operators?

627






What is a keyword?

740


What is volatile keyword in c?

577


What is array of pointers to string?

562


How can I list all of the predefined identifiers?

576


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

579


What is difference between Structure and Unions?

634


How do you do dynamic memory allocation in C applications?

626


what is uses of .net

1270


What are shell structures used for?

595


What is the most efficient way to count the number of bits which are set in an integer?

587