-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay28.java
More file actions
25 lines (20 loc) · 716 Bytes
/
Copy pathDay28.java
File metadata and controls
25 lines (20 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Map<String, String> db = new LinkedHashMap<String, String>();
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s = "";
sc.nextLine();
for(int i=0; i<n; i++){
String[] pairs = sc.nextLine().split(" ");
db.put(pairs[1], pairs[0]);
}
for(String key : db.keySet()){
if(key.endsWith("@gmail.com"))
System.out.println(db.get(key));
}
}
}