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
What are header files and what are its uses in C programming?
What are the types of data types and explain?
Explain how does free() know explain how much memory to release?
What is double pointer in c?
What are the types of macro formats?
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.. :(
What is sizeof in c?
What does printf does?
What are the types of type qualifiers in c?
Explain threaded binary trees?
what is the syallabus of computer science students in group- 1?
What is c method?
Explain what are reserved words?
Explain what is the difference between far and near ?
How do you print an address?