title: Find Sum Even Index Binomial Coefficients 1
signature: function findSumEvenIndexBinomialCoefficients1(n: number): number {
source_py: def find_sum_even_index_binomial_coefficients_1(n):
      return (1 << (n - 1))
source_cpp: int find_sum_even_index_binomial_coefficients_1(int n) {
    return ( 1 << ( n - 1 ) );
  }
question_info.test_list: [{"idx": 0, "outputs": 36028797018963968, "inputs": {"n": 56}}, {"idx": 1, "outputs": 134217728, "inputs": {"n": 28}}, {"idx": 2, "outputs": 8, "inputs": {"n": 4}}, {"idx": 3, "outputs": 8388608, "inputs": {"n": 24}}, {"idx": 4, "outputs": 536870912, "inputs": {"n": 30}}, {"idx": 5, "outputs": 140737488355328, "inputs": {"n": 48}}, {"idx": 6, "outputs": 2147483648, "inputs": {"n": 32}}, {"idx": 7, "outputs": 4096, "inputs": {"n": 13}}, {"idx": 8, "outputs": 262144, "inputs": {"n": 19}}]
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, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(56, 36028797018963968);
    console.log(`TEST-0...${result}`);
  
    result = driver(28, 134217728);
    console.log(`TEST-1...${result}`);
  
    result = driver(4, 8);
    console.log(`TEST-2...${result}`);
  
    result = driver(24, 8388608);
    console.log(`TEST-3...${result}`);
  
    result = driver(30, 536870912);
    console.log(`TEST-4...${result}`);
  
    result = driver(48, 140737488355328);
    console.log(`TEST-5...${result}`);
  
    result = driver(32, 2147483648);
    console.log(`TEST-6...${result}`);
  
    result = driver(13, 4096);
    console.log(`TEST-7...${result}`);
  
    result = driver(19, 262144);
    console.log(`TEST-8...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: findSumEvenIndexBinomialCoefficients1
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js