Guest User

Untitled

a guest
Dec 11th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. puts (1..9876).map{|a| (1..(9/a.to_s.size).to_i).map{|b| (a*b).to_s}.join}.select{|a| a.split("").sort.join=='123456789'}.max
  2. # 932718654
Add Comment
Please, Sign In to add comment