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
How can I call fortran?
Do you have any idea how to compare array with pointer in c?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
What is the difference between fread buffer() and fwrite buffer()?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Are there any problems with performing mathematical operations on different variable types?
What is the difference between union and anonymous union?
What was noalias and what ever happened to it?
write a program to copy the string using switch case?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
All technical questions
Does sprintf put null character?
Why we use break in c?
Why do we use c for the speed of light?
What is stack in c?