-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay 29.java
More file actions
32 lines (29 loc) · 723 Bytes
/
Day 29.java
File metadata and controls
32 lines (29 loc) · 723 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
26
27
28
29
30
31
32
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) throws IOException {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
List<String> nm=new ArrayList();
for(int i=1;i<=n;i++)
{
String s=sc.next();
String f=sc.next();
if(f.contains("@gmail.com"))
{
nm.add(s);
}
}
Collections.sort(nm);
n=nm.size();
for(int i=0;i<n;i++)
{
System.out.println(nm.get(i));
}
}
}