LeetCode 326. Power of Three
2022.07.18
問題
https://leetcode.com/problems/power-of-three/
typescript
function isPowerOfThree(n: number): boolean {
return Number.isInteger(parseFloat((Math.log(n)/Math.log(3)).toPrecision(15)))
};
https://leetcode.com/problems/power-of-three/
function isPowerOfThree(n: number): boolean {
return Number.isInteger(parseFloat((Math.log(n)/Math.log(3)).toPrecision(15)))
};