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
What are structures and unions? State differencves between them.
How do you determine the length of a string value that was stored in a variable?
What does p mean in physics?
Can a void pointer point to a function?
Explain bitwise shift operators?
What is a keyword?
What is volatile keyword in c?
What is array of pointers to string?
How can I list all of the predefined identifiers?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
What is difference between Structure and Unions?
How do you do dynamic memory allocation in C applications?
what is uses of .net
What are shell structures used for?
What is the most efficient way to count the number of bits which are set in an integer?