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.
Day 8: Dictionaries and Maps
Day 8: Dictionaries and Maps
Sort by
recency
|
2694 Discussions
|
Please Login in order to post a comment
I get a Runtime Error :( after all tests are passed. Anyone knows why does this happens?
I'm trying to solve this in Go and all of my attempts are timing out on test cases 1 - 3, despite working on the sample input 0. I think it's the loop reading/handling the query names, but I don't know why. Some examples:
STATUS: RUNTIME ERROR. ALL TESTS PASSED.
N = int(input()) dicc = {}
for i in range(N): name, number = input().split() dicc[name] = number
for i in range(N): name = input() if name in dicc: print(name+ "=" + dicc[name]) else: print("Not found")
this is my solution, it works for sample test case 0, but why doesn't it works when i submit the solution, i'm using nodejs, anyone have any idea what did i do wrong?