rubyでRのorder
a=[5,2,3,1] (a.length).times.sort{|x,y| a[x] <=> a[y]}
a=[5,2,3,1] b=[2,3,4,7] c=(a.length).times.sort{|x,y| a[x] <=> a[y]} c.each{|i| puts a[i].to_s+","+b[i].to_s}
rubyでRのorder
a=[5,2,3,1] (a.length).times.sort{|x,y| a[x] <=> a[y]}
a=[5,2,3,1] b=[2,3,4,7] c=(a.length).times.sort{|x,y| a[x] <=> a[y]} c.each{|i| puts a[i].to_s+","+b[i].to_s}