/ OPS / 题库 /

P Number Extended Reloaded

P Number Extended Reloaded

#描述#
Given a sequence b1, b2, b3… bn of even length, the occurrence of every bi (i=1, 2, 3…n) is an even number except two numbers, the P numbers, which occur odd times. Your task is to find those two P numbers.

#格式#
##输入格式##
The input file contains several test case, each test case starts with a line contains an even number n (0<n<10 000), the length of the sequence, followed by a line with n numbers b1, b2, b3…bn. It is guaranteed that every bi (i=1, 2, 3..,n) can be represented by a signed integer. The input is terminated by a test case with n = 0. It should not be processed.

##输出格式##
For each test case, output a line the P numbers of the corresponding sequence in ascending order with a space character between the two numbers.

#样例1#
##样例输入1##

6
2 3 2 3 4 5
8
2 2 2 2 2 2 2 9
0

##样例输出1##

4 5
2 9

#限制#
1000ms
32768KB

#提示#

#来源#

信息

ID
1574
难度
5
分类
category1 点击显示
标签
递交数
0
已通过
0
通过率
?
上传者