l = list(range(1, 31))
i = 1
list_i = i - 1
while True:
if len(l) <= 15:
break
else:
if i == 9:
print('{0}号下船了'.format(l[list_i]))
l.remove(l[list_i])
index = 1
else:
i += 1
list_i += 1
if list_i == len(l):
list_i = 0
约瑟夫游戏
最新推荐文章于 2024-06-10 12:47:07 发布