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 to capitalise first letter of each word in a given string?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What is linear search?
Which of these functions is safer to use : fgets(), gets()? Why?
hi any body pls give me company name interview conduct "c" language only
What is a built-in function in C?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
How many types of sorting are there in c?
Explain what does the function toupper() do?
What is c++ used for today?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
What is maximum size of array in c?
What is c preprocessor mean?
Explain the meaning of keyword 'extern' in a function declaration.
How do you redirect a standard stream?