Recursion Practice
Recursion Practice
coins and Alice is the first player to pick, she will definitely pick 2
coins and win. If there are 3 coins and Alice is still the first player
to pick, no matter she picks 1 or 2 coins, Bob will get the last coin
and win the game. Given the number of coins and the order of
players (which means the first and the second players to pick the
coins), you are required to write a program to calculate the winner
of the game, and calculate how many different strategies there are
for he/she to win the game. You should use recursion to solve
the problem, and the parameters are read from the command line.
You can assume that there are no more than 30 coins.