title: Sum Of All Elements Up To Nth Row In A Pascals Triangle 1
signature: sum_of_all_elements_up_to_nth_row_in_a_pascals_triangle_1 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          53L, 
          9007199254740991L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          3L, 
          7L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          28L, 
          268435455L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          44L, 
          17592186044415L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          46L, 
          70368744177663L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          3L, 
          7L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          16L, 
          65535L
      )))
  
  }
  
  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 );
  }