title: Divisibility 9 Using Bitwise Operators
signature: divisibility9UsingBitwiseOperators(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(bool actual, bool expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, bool expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          96, 
          false)
      }");
  
      print("TEST-1...${driver(
          85, 
          false)
      }");
  
      print("TEST-2...${driver(
          54, 
          true)
      }");
  
      print("TEST-3...${driver(
          14, 
          false)
      }");
  
      print("TEST-4...${driver(
          47, 
          false)
      }");
  
      print("TEST-5...${driver(
          11, 
          false)
      }");
  
      print("TEST-6...${driver(
          49, 
          false)
      }");
  
      print("TEST-7...${driver(
          99, 
          true)
      }");
  
      print("TEST-8...${driver(
          28, 
          false)
      }");
  
      print("TEST-9...${driver(
          82, 
          false)
      }");
  
      return 0;
  }
source_py: def divisibility_9_using_bitwise_operators(n):
      if ((n == 0) or (n == 9)):
          return True
      if (n < 9):
          return False
      return divisibility_9_using_bitwise_operators((int((n >> 3)) - int((n & 7))))
source_cpp: bool divisibility_9_using_bitwise_operators(int n) {
    if ( n == 0 || n == 9 ) return true;
    if ( n < 9 ) return false;
    return divisibility_9_using_bitwise_operators ( ( int ) ( n >> 3 ) - ( int ) ( n & 7 ) );
  }