-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1041.java
More file actions
33 lines (30 loc) · 891 Bytes
/
1041.java
File metadata and controls
33 lines (30 loc) · 891 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
33
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
// BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StreamTokenizer tk = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
tk.nextToken();
int n = (int)tk.nval;
// String line[] = br.readLine().split(" ");
// int n = Integer.parseInt(line[0]);
int number[] = new int[n];
int check[] = new int[100000];
for(int i =0;i<n;i++) {
tk.nextToken();
int index=(int)tk.nval;
// int index = Integer.parseInt(line[i+1]);
number[i] = index;
check[index]++;
}
for(int i =0;i<n;i++) {
if(check[number[i]]==1) {
System.out.println(number[i]);
System.exit(0);
}
}
System.out.println("None");
}
}