title: Sum Of All Elements Up To Nth Row In A Pascals Triangle 1
signature: sumOfAllElementsUpToNthRowInAPascalsTriangle1(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          53, 
          9007199254740991)
      }");
  
      print("TEST-1...${driver(
          3, 
          7)
      }");
  
      print("TEST-2...${driver(
          28, 
          268435455)
      }");
  
      print("TEST-3...${driver(
          44, 
          17592186044415)
      }");
  
      print("TEST-4...${driver(
          46, 
          70368744177663)
      }");
  
      print("TEST-5...${driver(
          3, 
          7)
      }");
  
      print("TEST-6...${driver(
          16, 
          65535)
      }");
  
      return 0;
  }
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 );
  }