Problem 59
#! /usr/bin/env ruby # coding: utf-8 text = gets.chomp asciis = text.split(',').map{|c| c.to_i} 'aaa'.upto('zzz'){|word| key = word.bytes.to_a str = asciis.zip(key.cycle).map{|c| (c[0]^c[1]).chr}.join if str.index("this") and str.index("that") puts word,str puts str.bytes.inject{|sum,n| sum + n} end }