Here is my code : Only downfall is it won't work if any number is 0 in array.

```
public int singleNumber(int[] nums) {
HashSet<Integer> hs = new HashSet<Integer>();
for(int i = 0; i < nums.length; i++){
hs.add(nums[i]);
}
int cube = 1;
for(int x : hs){
cube *= Math.pow(x,3);
}
int result = 0;
for(int i = 0; i < nums.length; i++){
cube /= nums[i];
}
return (int)Math.sqrt(cube);
}
```