Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ct = 2
- l_a = ("a".."z").to_a
- inp = gets.chomp
- r_w_a = []
- inp.length.times {
- r_w_a << l_a.shuffle[0]
- }
- rd_word = r_w_a.join
- puts "1 " + rd_word
- pos = 0
- while rd_word != inp
- if l_a.shuffle[0] == inp.split[pos]
- a = rd_word.split
- a[pos].replace(inp.split[pos])
- rd_word = a.join
- pos += 1
- puts ct.to_s + ' ' + rd_word
- ct += 1
- else
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement