Key Value Store (Ignore Bad Lines)

Python Medium 3 views
Back to Questions

Problem Description

Read n lines with format key=value. Some lines may not have '=' or may be empty, ignore them. Then q queries keys. For each query output value or NOT FOUND.

Input Format

First line n. Next n lines. Next line q. Next q lines keys.

Output Format

q lines values.

Sample Test Case

Input:
4 a=10 badline b=hello = 3 a b c
Output:
10 hello NOT FOUND

Constraints

n+q

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next