@@ -0,0 +1,441 @@
+# 326-power-of-three.py%0A%0Aclass Solution(object):%0A    def isPowerOfThree(self, n):%0A        %22%22%22%0A        :type n: int%0A        :rtype: bool%0A        %22%22%22%0A        while n != 0 and n %25 3 == 0: n /= 3%0A        return n == 1%0A%0A    def isPowerOfThree_noloop(self, n):%0A        maxPowerOfThree = 1162261467%0A        return n != 0 and maxPowerOfThree %25 x == 0%0A        # Or we can use log: log3(x) = lg(x) / lg(3), should be an integer%0A        # (x %25 1 == 0)%0A

Add 326. Easy