title: How To Turn Off A Particular Bit In A Number
signature: function howToTurnOffAParticularBitInANumber(n: number, k: number): number {
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 ) ) );
  }
question_info.test_list: [{"idx": 0, "outputs": 49, "inputs": {"n": 49, "k": 15}}, {"idx": 1, "outputs": 59, "inputs": {"n": 59, "k": 69}}, {"idx": 2, "outputs": 76, "inputs": {"n": 76, "k": 20}}, {"idx": 3, "outputs": 27, "inputs": {"n": 27, "k": 76}}, {"idx": 4, "outputs": 61, "inputs": {"n": 61, "k": 60}}, {"idx": 5, "outputs": 67, "inputs": {"n": 67, "k": 27}}, {"idx": 6, "outputs": 63, "inputs": {"n": 63, "k": 71}}, {"idx": 7, "outputs": 85, "inputs": {"n": 85, "k": 25}}, {"idx": 8, "outputs": 90, "inputs": {"n": 90, "k": 64}}, {"idx": 9, "outputs": 24, "inputs": {"n": 24, "k": 55}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(n: number, k: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n, k),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(49, 15, 49);
    console.log(`TEST-0...${result}`);
  
    result = driver(59, 69, 59);
    console.log(`TEST-1...${result}`);
  
    result = driver(76, 20, 76);
    console.log(`TEST-2...${result}`);
  
    result = driver(27, 76, 27);
    console.log(`TEST-3...${result}`);
  
    result = driver(61, 60, 61);
    console.log(`TEST-4...${result}`);
  
    result = driver(67, 27, 67);
    console.log(`TEST-5...${result}`);
  
    result = driver(63, 71, 63);
    console.log(`TEST-6...${result}`);
  
    result = driver(85, 25, 85);
    console.log(`TEST-7...${result}`);
  
    result = driver(90, 64, 90);
    console.log(`TEST-8...${result}`);
  
    result = driver(24, 55, 24);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: howToTurnOffAParticularBitInANumber
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js