Created
September 17, 2021 16:06
-
-
Save fxn/2e1d9bdb3bc8a387e8a5e0b8e2ce50bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 3004953 | |
start = n/2 + 1 | |
play = [*start..n, *1...start] | |
while n > 1 | |
play.shift | |
play << play.shift if n.odd? | |
n -= 1 | |
end | |
puts play |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment