class Solution {
public double Power(double base, int exponent) {
boolean flag=true;
if(exponent<0)
{
exponent=exponent^0xffffffff;
flag=false;
exponent++;
}
double res=1;
while(exponent-->0)
res*=base;
if(!flag)
return 1/res;
else
return res;
}
}