message: Update check-if-number-is-a-sum-of-powers-of-three.cpp
diff: class Solution {
  public:
  bool checkPowersOfThree(int n) {
  - while (n) {
  - if (n % 3 == 2) {
  - return false;
  - }
  - n /= 3;
  - }
  - return true;
  + for (; n > 0 && n % 3 != 2; n /= 3);
  + return n == 0;
  }
  };
  