leetcode 50 – Pow(x, n)



Implement pow(x, n), which calculates x raised to the power n (xn).
Power n (xn)으로 x를 계산하는 pow (x, n)을
구현합니다.

/**
 * @param {number} x
 * @param {number} n
 * @return {number}
 */
var myPow = function(x, n) {
    return Math.pow(x, n).toFixed(5);
};

 

댓글 달기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

위로 스크롤