public class Solution {
public double Power(double base, int exponent) {
double re=1;
int ex = Math.abs(exponent);
for(int i=0;i<=ex;i++){
if(i==0){
continue;
}
re = re * base;
}
return exponent>0?re:1/re;
}
}