Home  >  Article  >  Web Front-end  >  A js version of the counting game (Joseph Ring Problem)_javascript skills

A js version of the counting game (Joseph Ring Problem)_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:21:491711browse

This is also an old problem. There was a heated discussion on this problem in the garden. At that time, we pursued using oo to solve it. Now that someone has mentioned it again, I took some time to write down my own thoughts:

Copy code The code is as follows:



The result is as follows:
Copy the code The code is as follows:

Out: 3 Out: 6 Out :9 Out: 12 Out: 15 Out: 18 Out: 21 Out: 24 Out: 27 Out: 30 Out: 33 Out: 36 Out: 39 Out: 42 Out: 45 Out: 48 Out: 51 Out: 54 Out: 57 Out: 60 Out: 63 Out: 66 Out: 69 Out: 72 Out: 75 Out: 78 Out: 81 Out: 84 Out: 87 Out: 90 Out: 93 Out: 96 Out: 99 Out: 2 Out: 7 Out: 11 Out: 16 Out: 20 Out: 25 Out: 29 Out: 34 Out: 38 Out: 43 Out: 47 Out: 52 Out: 56 Out: 61 Out: 65 Out: 70 Out: 74 Out: 79 Out: 83 Out :88 Out: 92 Out: 97 Out: 1 Out: 8 Out: 14 Out: 22 Out: 28 Out: 35 Out: 41 Out: 49 Out: 55 Out: 62 Out: 68 Out: 76 Out: 82 Out: 89 Out: 95 Out: 4 Out: 13 Out: 23 Out: 32 Out: 44 Out: 53 Out: 64 Out: 73 Out: 85 Out: 94 Out: 5 Out: 19 Out: 37 Out: 50 Out: 67 Out: 80 Out: 98 Out: 17 Out: 40 Out: 59 Out: 86 Out: 10 Out: 46 Out: 77 Out: 26 Out: 71 Out: 31 Out: 100 Out: 58
Remaining: 91
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn