@@ -0,0 +1,353 @@
+package leetcode;%0A%0Apublic class PowerOfThree %7B%0A%0A%09public boolean isPowerOfThree(int n) %7B%0A%09%09if (n %3C= 0) %7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%09while (n %25 3 == 0) %7B%0A%09%09%09n /= 3;%0A%09%09%7D%0A%09%09return n == 1;%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09System.out.println(new PowerOfThree().isPowerOfThree(27));%0A%09%09System.out.println(new PowerOfThree().isPowerOfThree(45));%0A%09%7D%0A%7D%0A

Add PowerOfThree.java