Created
January 26, 2015 13:46
-
-
Save anonymous/5401b3faf1c438ada7d7 to your computer and use it in GitHub Desktop.
Ruby gist perm
This file contains 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
a = [] | |
1.upto(9) do |t| | |
a.push(t) | |
end | |
a = a.permutation.to_a.reverse | |
nums =[] | |
for i in 0..a.length | |
num = a[i].map(&:to_s).join.to_i | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment