组合数学,取子游戏,nim简单

时间:2016-04-20 08:24:28
【文件属性】:

文件名称:组合数学,取子游戏,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.


网友评论

  • 稍微简单了点,不过还是挺有帮助的
  • 程序是正确的 不过好简单
  • 程序正确,秒过