326-Power-Of-Three

Sat 17 May 2025

https://leetcode.com/problems/power-of-three

import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
  def isPowerOfThree(self, n: int) -> bool:
    return n > 0 and 3**19 % n == 0
new Solution().isPowerOfThree()

Score: 5

Category: leetcode