Solution to Numbers Appear Once from Jobdu

8 Sep

Question (in Chinese):

Question Name: Numbers Appear Once

Question Description: in an int array, every number appears even count of times, except two numbers, which appear only once. Find the two numbers.

Input: the input might contain multiple test cases. Inside each test case, the first line includes one integer N (1 <= N <= 10^6), saying the number of items in the array. The second line contains N integers as the content of the array.

Output: print the two numbers, with the smaller one firstly.

The solution is:

Leave a Reply

Your email address will not be published. Required fields are marked *

Please put your code into a <pre>YOUR CODE</pre> section. Thanks and Happy Coding!