Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # encoding:utf-8
- # caracteres compatibles:
- # abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ<>;,:.-_^[]{}'+!"$%&/()=?\|@#~`*0123456789
- threexfive = '
- # # ## # # # # # # # ## ## ## ### ### ## # # ## ### # # # # # ### # ## # ## ## ### # # # # # # # # # # ### # # # ## ## ## ## # # # # ## # # # # # # ### # # ### # # # # # ### # ### ### # # ### ### ### ### ###
- ## ### ### ### ### # ### ### # # # ### ## ### ### ### ### ## ### # # # # # # # # # # ## # # # # # # # # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # ### # # # # # ### ### # ### # # ## # # # # # # # # # # #
- # # # # # # # ## ### # # # # # # ## # ### # # # # # # # # # # # # # # # ### # ### # ### ## # # # ## ## # # ### # # ## # ### # # # # ## # # ## # # # # # # ### # # # # # ### # # ## ## # ### # ### # ## # # # ## # # # # # # # # # # # ### ## ### ### ### # ### ###
- ### ### ### ### ### # ## # # ## # # # ## # # # # ### ### ### # ## ## ### # ### # # # ## # # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ### # # # # # # # # # # # # # # ## # # # # # # ### # # ### ### ### # # # # # # # # # # # # #
- ## ### # # # ### # # ## ## ## ### # ## # # # ### # # ### # # # # # # # # # ## # ### # # # # # # ### # # # # # ### ## ## ## ## # ## # # ### # # # # # # # # # ### ### ### ### # ### ### # ### ###
- '
- char_pos = {
- :' ' => ' ',
- :a => 0..3,
- :b => 4..7,
- :c => 8..11,
- :d => 12..15,
- :e => 16..19,
- :f => 20..23,
- :g => 24..27,
- :h => 28..31,
- :i => 33..35,
- :j => 36..38,
- :k => 40..43,
- :l => 45..47,
- :m => 48..51,
- :n => 52..55,
- :o => 56..59,
- :p => 60..63,
- :q => 64..67,
- :r => 68..71,
- :s => 72..75,
- :t => 76..79,
- :u => 80..83,
- :v => 84..87,
- :w => 88..91,
- :x => 92..95,
- :y => 96..99,
- :z => 100..103,
- :A => 104..107,
- :B => 108..111,
- :C => 112..115,
- :D => 116..119,
- :E => 120..123,
- :F => 124..127,
- :G => 128..131,
- :H => 132..135,
- :I => 136..139,
- :J => 140..143,
- :K => 144..147,
- :L => 148..151,
- :M => 152..155,
- :N => 156..159,
- :O => 160..163,
- :P => 164..167,
- :Q => 168..171,
- :R => 172..175,
- :S => 176..179,
- :T => 180..183,
- :U => 184..187,
- :V => 188..191,
- :W => 192..195,
- :X => 196..199,
- :Y => 200..203,
- :Z => 204..206,
- :< => 207..210,
- :> => 211..214,
- :';' => 215..218,
- :',' => 219..222,
- :':' => 223..226,
- :'.' => 227..230,
- :- => 231..234,
- :_ => 235..238,
- :'^' => 239..242,
- :'[' => 244..246,
- :']' => 248..250,
- :'{' => 251..254,
- :'}' => 255..258,
- :'\'' => 259..262,
- :+ => 263..266,
- :'!' => 268..270,
- :'"' => 271..274,
- :'$' => 275..278,
- :% => 279..282,
- :& => 283..286,
- :/ => 287..290,
- :'(' => 292..295,
- :')' => 296..298,
- :'=' => 300..302,
- :'?' => 303..306,
- :'\\' => 307..310,
- :| => 312..314,
- :'@' => 316..319,
- :'#' => 320..323,
- :~ => 324..327,
- :` => 328..331,
- :* => 332..335,
- :'0' => 336..339,
- :'1' => 340..343,
- :'2' => 344..347,
- :'3' => 348..351,
- :'4' => 352..355,
- :'5' => 356..359,
- :'6' => 360..363,
- :'7' => 364..367,
- :'8' => 368..371,
- :'9' => 372..375,
- }
- word = 'TESTEANDO'
- result = Array.new(threexfive.lines.count){''}
- word.each_char do |char|
- pos = char_pos[char.to_sym]
- threexfive.lines.each_with_index do |line,index|
- next if index == 0
- result[index] << line[pos]
- end
- end
- result = result.join("\n")
- puts result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement