title: Sum Of All Elements Up To Nth Row In A Pascals Triangle 1
signature: function sum_of_all_elements_up_to_nth_row_in_a_pascals_triangle_1(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(53, 9007199254740991);
      @printf("TEST-0...%s\n",result);
      
      result = driver(3, 7);
      @printf("TEST-1...%s\n",result);
      
      result = driver(28, 268435455);
      @printf("TEST-2...%s\n",result);
      
      result = driver(44, 17592186044415);
      @printf("TEST-3...%s\n",result);
      
      result = driver(46, 70368744177663);
      @printf("TEST-4...%s\n",result);
      
      result = driver(3, 7);
      @printf("TEST-5...%s\n",result);
      
      result = driver(16, 65535);
      @printf("TEST-6...%s\n",result);
      
  end
  
  main()
source_py: def sum_of_all_elements_up_to_nth_row_in_a_pascals_triangle_1(n):
      sum = 0
      sum = (1 << n)
      return (sum - 1)
source_cpp: long long int sum_of_all_elements_up_to_nth_row_in_a_pascals_triangle_1(int n) {
    long long int sum = 0;
    sum = 1 << n;
    return ( sum - 1 );
  }