package leetcode;

/**
 * https://leetcode.com/problems/check-if-number-is-a-sum-of-powers-of-three/
 */
public class Problem1780 {
    public boolean checkPowersOfThree(int n) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem1780 prob = new Problem1780();
        System.out.println(prob.checkPowersOfThree(12)); // true
        System.out.println(prob.checkPowersOfThree(91)); // true
        System.out.println(prob.checkPowersOfThree(21)); // false
    }
}

@@ -168,24 +168,46 @@
 ee(int n) %7B%0A
+        long sum = 0;%0A
         // T
@@ -386,150 +386,473 @@
 ee(1
-2)); // true%0A        System.out.println(prob.checkPowersOfThree(91)); // true%0A        System.out.println(prob.checkPowersOfThree(21)); // fals
+)); // false%0A        System.out.println(prob.checkPowersOfThree(2)); // false%0A        System.out.println(prob.checkPowersOfThree(3)); // true%0A        System.out.println(prob.checkPowersOfThree(4)); // true%0A        System.out.println(prob.checkPowersOfThree(12)); // true%0A        System.out.println(prob.checkPowersOfThree(21)); // false%0A        System.out.println(prob.checkPowersOfThree(30)); // true%0A        System.out.println(prob.checkPowersOfThree(91)); // tru
 e%0A  

Update problem 1780