python
class Solution:
def isPowerOfThree(self, n: int) -> bool:
if n ==1:
return True
i = 1
while(pow(3,i)

python
class Solution:
def isPowerOfThree(self, n: int) -> bool:
if n ==1:
return True
i = 1
while(pow(3,i)