這樣的問題有規律可尋嗎?
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?
請教:Counting-off Puzzles
所有跟帖:
•
回複:請教:Counting-off Puzzles
-大財主-
♂
(9 bytes)
()
06/19/2012 postreply
13:42:59
•
15
-jinjing-
♀
(0 bytes)
()
06/19/2012 postreply
16:53:08
•
Recursive formula : f(m+1)=7+f(m)-(m+1)*[(7+f(m))/(m+1)]
-jinjing-
♀
(51 bytes)
()
06/21/2012 postreply
11:45:34
•
m>7. f(m) : last number for m. f(1)=1,f(2)=2,...,f(7)=5, ...,
-jinjing-
♀
(98 bytes)
()
06/21/2012 postreply
12:04:10
•
should be f(m+1)=7+f(m)-(m+1)*[(6+f(m))/(m+1)],f(25)=15.
-jinjing-
♀
(0 bytes)
()
06/23/2012 postreply
08:56:33
•
謝謝各位。子女坦的大俠們給編了code。答案是15。
-bangbang9814-
♀
(0 bytes)
()
06/25/2012 postreply
15:48:15
•
回複:請教:Counting-off Puzzles
-wxczcbm-
♂
(1689 bytes)
()
07/11/2012 postreply
18:26:19
•
很好,...,加一說明更好: m mod m=m. ...
-jinjing-
♀
(0 bytes)
()
07/11/2012 postreply
20:07:00