Python is faster:wynk wrote:My solution in ruby:
Code: Select all
input = ["9f", "c7"] input.map! { |x| x.to_i(16) } output = input.first ^ input.last puts output.chr
Code: Select all
"%c"%(0x9f ^ 0xc7)
Python is faster:wynk wrote:My solution in ruby:
Code: Select all
input = ["9f", "c7"] input.map! { |x| x.to_i(16) } output = input.first ^ input.last puts output.chr
Code: Select all
"%c"%(0x9f ^ 0xc7)