标签:mat style 面试题 one subject ble code font 面试题1
import java.lang.Math; public class Solution { public double Power(double base, int exponent) { double result=1.0; int m=Math.abs(exponent); if(exponent==0){ return result; } for(int i=0;i<m;i++){ result*=base; } if(exponent<0){ result=1.0/result; } return result; } }
标签:mat style 面试题 one subject ble code font 面试题1
原文地址:https://www.cnblogs.com/moonlightml/p/9862588.html