#P1469. 找筷子
找筷子
Description
After a period of intense preparation, the computer club’s "RP Restaurant" finally opened. One day, manager LXC received a large order, which made everyone very happy! The staff worked together to prepare the set meals as required and were about to deliver them when they suddenly encountered a tricky problem: chopsticks!
CX found all the chopsticks in the restaurant, but unfortunately they are of different lengths. We all know that a pair of chopsticks must be of the same length. To make it worse, the number of chopsticks CX found is odd. Coincidentally, among these chopsticks, only one chopstick is single, and all the others are in pairs. Kind-hearted as you are, can you help CX find the length of this single chopstick?
Input Format
The first line contains an integer, the number of chopsticks .
The second line contains integers. The -th integer is the length of the -th chopstick.
Output Format
Output a single integer in one line representing the answer.
9
2 2 1 3 3 3 2 3 1
2
Hint
Constraints
- For 30% of the testdata, it is guaranteed that .
- For 100% of the testdata, it is guaranteed that , .
Hints
- Pay attention to how input reading affects program efficiency.
- Note the space limit of Mb.
Translated by ChatGPT 5
京公网安备 11011102002149号