`
standalone
  • 浏览: 611486 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Last Survival

 
阅读更多

There are 100 people forming a circle and they are numbered from 1 to 100. They decide to kill each other using a sword, in following manner. At any point, person numbered n having a sword kills person numbered n+1 and passes the sword to n+2. This process doesnt stop untill at the end only 1 person remains alive. Initially, person numbered 1 has the sword in hand. Calculate the survivor number. What about any general N ?

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics