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 / rahul
N%2
if it gives 0 then the person can choose to go second.if
nonzero then he should go first.But this logic is acceptable
only if there is atleast one egg in each basket.
| Is This Answer Correct ? | 2 Yes | 7 No |
Post New Answer View All Answers
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What is pragma in c?
What are the benefits of organizational structure?
Is it possible to initialize a variable at the time it was declared?
What is main () in c language?
Explain what is the difference between null and nul?
What does %2f mean in c?
What is the description for syntax errors?
How do you convert strings to numbers in C?
write an algorithm to display a square matrix.
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
Why use int main instead of void main?
Why & is used in scanf in c?
What is the difference between volatile and const volatile?