-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCG_1.java
More file actions
30 lines (22 loc) · 740 Bytes
/
Copy pathCG_1.java
File metadata and controls
30 lines (22 loc) · 740 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
import java.util.Scanner;
import java.io.FileInputStream;
class CG_1 { // 숫자 골라내기
public static void main(String args[]) throws Exception {
// Scanner sc = new Scanner(new FileInputStream("sample_input.txt"));
Scanner sc = new Scanner(System.in);
int T;
int test_case;
T = sc.nextInt();
for (test_case = 1; test_case <= T; test_case++) {
int n = sc.nextInt();
int num = 0;
int result = 0;
for (int i = 0; i < n; i++) {
num = sc.nextInt();
result ^= num;
}
System.out.println("Case #" + test_case);
System.out.println(result);
}
}
}