We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Can anyone help me figure why all my test pass at submission yet I get a runtime error ?
This is my code
# Enter your code here. Read input from STDIN. Print output to STDOUTimportsysimportmathimportfileinputn=input()number=int(n)inp=[]phonebook={}forlineinfileinput.input():inp.append(line.split())foriinrange(number):phonebook.update({str(inp[i][0]):str(inp[i][1])})foriinrange(number,number+number):ifphonebook.get(str(inp[i][0]))==None:print("Not found")else:print(inp[i][0]+"="+phonebook.get(str(inp[i][0])))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Dictionaries and Maps
You are viewing a single comment's thread. Return to all comments →
Can anyone help me figure why all my test pass at submission yet I get a runtime error ? This is my code