Array practice 1
This practice problem will require you to programme basic array (list) operations.
You are hired to offer phone number look up service for a company's internal network. The company has \(N\) employees with employee ID \(0\) to \(N-1\). Your job is to when asked for the phone number for employee \(i\), output that person's number on screen.
Input Specification
The first line will contain two integers \(N\) and \(M\) (\(1 < N,M < 10000\)), indicating the number of employees in your directory, and the number of queries.
The following \(N\) lines will each contain a single integer \(P\) (\(1 < P < 1000000\)), indicating the an employee's phone number.
Then, the next \(M\) lines will each contain a query for phone number by a single integer, which is the employee's ID.
Output Specification
There should be \(M\) lines in your output, each an integer for the phone number that is asked.
Should the query ask for an employee not on the directory (\(P > N-1\)), output
No entry
.
Sample Input
5 3
1024
2048
7789
4321
42
2
7
3
Sample Output
7789
No entry
4321
Comments