Permutations by tabasa

(a=[0,1,2,3,4,5]).each{|i|(b=a-[i]).each{|j|(c=b-[j]).each{|k|(d=c-[k]).each{|l|(e=d-[l]).each{|m|puts "#{i} #{j} #{k} #{l} #{m} #{e-[m]}"}}}}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top