LeetCode 326. Power of Three
2022.07.18

問題

typescript

typescript

function isPowerOfThree(n: number): boolean {
  return Number.isInteger(parseFloat((Math.log(n)/Math.log(3)).toPrecision(15)))
};