title: Turn Off The Rightmost Set Bit
signature: turn_off_the_rightmost_set_bit <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          9L, 
          8L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          54L, 
          52L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          60L, 
          56L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          32L, 
          0L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          41L, 
          40L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          64L, 
          0L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          4L, 
          0L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          51L, 
          50L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          57L, 
          56L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          92L, 
          88L
      )))
  
  }
  
  main()
source_py: def turn_off_the_rightmost_set_bit(n):
      return (n & (n - 1))
source_cpp: int turn_off_the_rightmost_set_bit(unsigned int n) {
    return n & ( n - 1 );
  }