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 is putchar() function?
What is default value of global variable in c?
Explain what is wrong with this program statement? Void = 10;
What is dynamic memory allocation?
Difference between strcpy() and memcpy() function?
What is null pointer constant?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
Can you assign a different address to an array tag?
What does 2n 4c mean?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
a c code by using memory allocation for add ,multiply of sprase matrixes
Can we use visual studio for c?
What is the mean of function?
Write a c program to demonstrate character and string constants?
What is the difference between null pointer and wild pointer?