<awangdev>Power of Three_1.java
public boolean isPowerOfThree(int n) {
        if (n <= 0) {
            return false;
        }
        int start = 0;
        int end = n;
        while (start + 1 < end) {
            int mid = start + (end - start)/2;
            long powerOfThree = (long) Math.pow(3, mid);
            if (powerOfThree == n) {
                return true;
            }
            if (powerOfThree < n) {
                start = mid;
            } else {
                end = mid;
            }
        }
        return Math.pow(3, start) == n;
    }
public boolean var_0 ( int var_1 ) {
  if ( var_1 <= 0 ) {
    return false ;
  }
  int var_3 = 0 ;
  int var_4 = var_1 ;
  while ( var_3 + 1 < var_4 ) {
    int var_7 = var_3 + ( var_4 - var_3 ) / 2 ;
    long var_11 = ( long ) Math . pow ( 3 , var_7 ) ;
    if ( var_11 == var_1 ) {
      return true ;
    }
    if ( var_11 < var_1 ) {
      var_3 = var_7 ;
    }
    else {
      var_4 = var_7 ;
    }
  }
  return Math . pow ( 3 , var_3 ) == var_1 ;
}
