Decode Caesar ciphers by hrsh7th

i,v=0,0\x0d
x={?L=>8,?U=>14,?G=>20}\x0d
[*$<].join.bytes{|c|v=x[c] if (i=i+1)==1\x0d
print (?A<=c&&c<=?Z||?a<=c&&c<=?z?(c+v>=(c>=?a? ?a:?A)+26?-(26-v)+c:c+v):c).chr}

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

download

return to the top page