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);
};

 

  • 네이버 블로그 공유
  • 네이버 밴드 공유
  • 페이스북 공유
  • 카카오스토리 공유