文学城论坛
+A-

请教:Counting-off Puzzles

bangbang9814 2012-06-18 19:44:30 ( reads)

这样的问题有规律可寻吗?

25 people are standing in ca circle. Starting with person 1, they count off from 1 to 7 and them start over with 1. Each person who says"7" drops out of the circle. who is the last person left?

跟帖(8)

大财主

2012-06-19 13:42:59

回复:请教:Counting-off Puzzles

jinjing

2012-06-19 16:53:08

15

jinjing

2012-06-21 11:45:34

Recursive formula : f(m+1)=7+f(m)-(m+1)*[(7+f(m))/(m+1)]

jinjing

2012-06-21 12:04:10

m>7. f(m) : last number for m. f(1)=1,f(2)=2,...,f(7)=5, ...,

jinjing

2012-06-23 08:56:33

should be f(m+1)=7+f(m)-(m+1)*[(6+f(m))/(m+1)],f(25)=15.

bangbang9814

2012-06-25 15:48:15

谢谢各位。子女坦的大侠们给编了code。答案是15。

wxczcbm

2012-07-11 18:26:19

回复:请教:Counting-off Puzzles

jinjing

2012-07-11 20:07:00

很好,...,加一说明更好: m mod m=m. ...