提示: 欢迎访问OurACM平台
Problem 1001 Duplicate Pair

Accept: 5370    Submit: 25583
Time Limit: 1000 mSec    Memory Limit : 65536 KB

Problem Description

An array of length n, with address from 1 to n inclusive, contains entries from the set {1,2,...,n-1} and there's exactly two elements with the same value. Your task is to find out the value.

Input

Input contains several cases.
Each case includes a number n (1<n<=10^6), which is followed by n integers.
The input is ended up with the end of file.

Output

Your must output the value for each case, one per line.

Sample Input

2 1 1 4 1 2 3 2

Sample Output

1 2

Source

IBM Challenge 2004.1

Submit  Back  Status  Discuss