r********n 发帖数: 6979 | 1 【 以下文字转载自 JobHunting 讨论区 】
发信人: mudhoof (正在长牙的羊), 信区: JobHunting
标 题: 微软brainteaser
发信站: BBS 未名空间站 (Mon Dec 7 13:54:15 2009, 美东)
圆圈上顺时针排列着1,2,3,....2000 这2000个数. 从1开始,顺时针隔一个拿走一个(1
最先被拿走,下一个是3被拿走). 问最后剩下是哪一个数字. | p*****k 发帖数: 318 | 2 write N (not a power of 2) in base 2, remove the first digit "1",
then put one "0" at the end.
this Josephus problem has been discussed before on this board:
http://www.mitbbs.com/article_t/BrainTeaser/31166663.html |
|