671. Unique Number Finder
0
Medium
Given an array of integers called *nums*, find the element that appears only once among the elements that appear three times. Print the unique element.
Input Format
The first line of input contains the size of the array, N.
The second line of input contains N space-separated integers representing the elements of the array.
The second line of input contains N space-separated integers representing the elements of the array.
Output Format
Print the unique number.
Example
Input
4
2 2 3 2
Output
3
Constraints
1 <= nums.length <= 3 * 104
-231 <= nums[i] <= 231 - 1
Each element in nums appears exactly three times except for one element which appears once.
-231 <= nums[i] <= 231 - 1
Each element in nums appears exactly three times except for one element which appears once.
Loading...
View Submissions
Console