Lonely Rune (Arrays & Lists)

Every value in the list appears exactly twice, except one that appears once. Print the lonely one.

Input: n (odd, 1 to 999), then n integers between -30000 and 30000.

Output: The value that appears once.

Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • A set works: add on the first sight, remove on the second.

More Arrays & Lists practice