use the binary representation of n to do the calculation

```
class Solution {
public:
double pow(double x, int n) {
unsigned int abs_n;
double res=1;
\
abs_n = n>0?n:-n;
while(abs_n)
{
if(abs_n & 0x01)
res *= x;
abs_n >>= 1;
x *= x;
}
if(n<0) res = 1/res;
return res;
}
};
```