+ 3
Picking up stones
Two people (A & B) play this game. There is a pile of stones. A plays first, followed by B. They take turns picking up 2, 3 or 5 stones. If there is only 1 stone left, the person can pick it up. The person who picks up the last stone wins the game. Both players are experienced and play the best move available to them. Can anyone write a program which takes number of stones as input and prints who is the winner?
3 Answers
+ 4
This can be a good assignment in the coding challenge. Please post this as a Assignment in lesson factory.
https://www.sololearn.com/discuss/1082512/?ref=app
+ 6
Thanks a lot and may the assignment gets published soon. Best of luck.
+ 3
@Akash I have created the assignment. Thanks for the suggestion.