Haven't tried the other language, but there is very neat solution of python, with one line of code only.

The idea is to use set() to find the unique numbers, then make a sum and times 2. Finally, substract the sum of the original list. Every integer exists 2 times except one. So the answer is quite obvious.

```
class Solution(object):
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
return 2*sum(set(nums)) - sum(nums)
```