| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:紧急问题约瑟夫问题In Reply To:紧急问题约瑟夫问题 Posted by:0812104239 at 2009-11-14 23:37:23 > Description > > n个人想玩残酷的死亡游戏,游戏规则如下: > > n个人进行编号,分别从1到n,排成一个圈,顺时针从1开始数到m,数到m的人被杀,剩下的人继续游戏,活到最后的一个人是胜利者。 > 请输出最后一个人的编号。 > > > > Input > > 输入n和m值。 > > Output > > 输出胜利者的编号。 > > Sample Input > > > 5 3 > > > > Sample Output > > > 4 要用从语言编写,谢谢 > 从语言进步到编程 从语言升级为平台 从语言特性到标准库组件再到编程技术 弱求从语言相关资料 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator