title: Turn Off The Rightmost Set Bit
signature: pub fn turn_off_the_rightmost_set_bit(n: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        9, 
        8
      ));
      
      println!("TEST-1...{}", driver(
        54, 
        52
      ));
      
      println!("TEST-2...{}", driver(
        60, 
        56
      ));
      
      println!("TEST-3...{}", driver(
        32, 
        0
      ));
      
      println!("TEST-4...{}", driver(
        41, 
        40
      ));
      
      println!("TEST-5...{}", driver(
        64, 
        0
      ));
      
      println!("TEST-6...{}", driver(
        4, 
        0
      ));
      
      println!("TEST-7...{}", driver(
        51, 
        50
      ));
      
      println!("TEST-8...{}", driver(
        57, 
        56
      ));
      
      println!("TEST-9...{}", driver(
        92, 
        88
      ));
      
  }
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 );
  }