Here's my code. It's not efficient and a kind of stupid but I think its run time complexity is O(n). I don't know why it still exceeds the time limit...

```
int count[65536];
int single = 0;
int i = 0;
for (i = 0; i < n; i ++)
{
count[A[i] % n] = 0;
}
for (i = 0; i < n; i ++)
{
count[A[i] % n] += 1;
}
for (i = 0; i < n; i ++)
{
if (count[A[i] % n] == 1)
{
single = A[i];
break;
}
}
return single;
}
```