title: How To Turn Off A Particular Bit In A Number
signature: how_to_turn_off_a_particular_bit_in_a_number <- function(n, k) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, k, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n, k), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          49L, 15L, 
          49L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          59L, 69L, 
          59L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          76L, 20L, 
          76L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          27L, 76L, 
          27L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          61L, 60L, 
          61L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          67L, 27L, 
          67L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          63L, 71L, 
          63L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          85L, 25L, 
          85L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          90L, 64L, 
          90L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          24L, 55L, 
          24L
      )))
  
  }
  
  main()
source_py: def how_to_turn_off_a_particular_bit_in_a_number(n, k):
      if (k <= 0):
          return n
      return (n & (~ (1 << (k - 1))))
source_cpp: int how_to_turn_off_a_particular_bit_in_a_number(int n, int k) {
    if ( k <= 0 ) return n;
    return ( n & ~ ( 1 << ( k - 1 ) ) );
  }