-
-
Save anonymous/527d87d9296bc0f7371efb14d09e0e77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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