Skip to content

Instantly share code, notes, and snippets.

/ruby

Created May 30, 2016 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/527d87d9296bc0f7371efb14d09e0e77 to your computer and use it in GitHub Desktop.
Save anonymous/527d87d9296bc0f7371efb14d09e0e77 to your computer and use it in GitHub Desktop.
# Enter your code here. Read input from STDIN. Print output to STDOUT
N = gets.to_i
x = ""
i = 0
b = ""
j = 0
k = 0
hash = {}
while i < N
i += 1
x = gets.chomp
y = x.split(" ")
hash[y[0]] = y[1].to_i
end
for j in 1..N do
s = gets.chomp
if hash.keys.include?(s)
puts s + "=" + hash[s].to_s
else
puts "Not found"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment