文件名称:组合数学,取子游戏,nim简单
文件大小:14KB
文件格式:DOC
更新时间:2016-04-20 08:24:28
取子游戏 nim简单
组合数学编程题取子游戏(简单)Two players alternate in removing either one or two from the pile. The player who remove the last stick is the loser. The opponent remove sticks at the first, then it's your turn. Write a program to determine how many sticks should be removed when there's n sticks left in the pile.