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.
I am facing a runtime issue in test case 1 in the following code (most probably due to time limit)
# Enter your code here. Read input from STDIN. Print output to STDOUTnumber_of_entries=int(input())Name_phone_number_dict={}for_inrange(number_of_entries):input_split=input().split(' ')Name_phone_number_dict[input_split[0]]=input_split[1]for_inrange(number_of_entries):name_check=input()ifname_checkinName_phone_number_dict:print(name_check+"="+Name_phone_number_dict[name_check])else:print("Not found")
How to tackle this, is there any better way to do this in python.
`
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 8: Dictionaries and Maps
You are viewing a single comment's thread. Return to all comments →
I am facing a runtime issue in test case 1 in the following code (most probably due to time limit)
How to tackle this, is there any better way to do this in python.
`